From 01ed58f17241983263cc34693615c921bccfaae5 Mon Sep 17 00:00:00 2001 From: Mikhail Romanko Date: Thu, 2 Jul 2026 11:20:46 +0300 Subject: [PATCH] Fix implicit casting of -1 to size_t --- Str.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Str.c b/Str.c index 4a46f06..7646cde 100644 --- a/Str.c +++ b/Str.c @@ -173,7 +173,7 @@ size_t CgeStrIndexRune(const CgeStr *str, uint32_t rune) { CgeStr tmp; tmp.data = scratch; - if ((tmp.size = CgeUtf8Encode(rune, scratch)) == -1) + if ((tmp.size = CgeUtf8Encode(rune, scratch)) == (size_t)-1) return (size_t)-1; return CgeStrIndexStr(str, &tmp); @@ -184,7 +184,7 @@ size_t CgeStrLastIndexRune(const CgeStr *str, uint32_t rune) { CgeStr tmp; tmp.data = scratch; - if ((tmp.size = CgeUtf8Encode(rune, scratch)) == -1) + if ((tmp.size = CgeUtf8Encode(rune, scratch)) == (size_t)-1) return (size_t)-1; return CgeStrLastIndexStr(str, &tmp);