Fix implicit casting of -1 to size_t
All checks were successful
CI / build-and-analyze (push) Successful in 38s

This commit is contained in:
2026-07-02 11:20:46 +03:00
parent 9e9f457a57
commit 01ed58f172

4
Str.c
View File

@@ -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);