From 2d4e26cf94e51626b2985ac4f64945a650176ad9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 16 Aug 2021 09:28:54 +0200 Subject: [PATCH] :art: Fix warning --- src/lib/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/string.c b/src/lib/string.c index 1ca973e2..a96446af 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -336,9 +336,9 @@ static MFUN(string_rfindStr) { static MFUN(string_rfindStrStart) { const m_str base = STRING(o); const size_t sz = strlen(base); - const char pos = *(m_int *)MEM(SZ_INT * 2); + const m_int pos = *(m_int *)MEM(SZ_INT * 2); const M_Object obj = *(M_Object *)MEM(SZ_INT); - if (sz && pos < sz) { + if (sz && (size_t)pos < sz) { const m_str arg = STRING(obj); m_str tmp = base + pos, str = NULL; while ((tmp = strstr(tmp, arg))) str = tmp++; -- 2.43.0