From: Jérémie Astor Date: Mon, 16 Aug 2021 07:28:54 +0000 (+0200) Subject: :art: Fix warning X-Git-Tag: nightly~470^2~81 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=2d4e26cf94e51626b2985ac4f64945a650176ad9;p=gwion.git :art: Fix warning --- 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++;