From ef04bf557f305f6a29156fd5f4c145ca2dda5792 Mon Sep 17 00:00:00 2001 From: GrayJack Date: Thu, 18 Apr 2024 02:30:51 -0300 Subject: [PATCH] refactor(c-api): Use `size_t` on `janet_cstrcmp` --- src/core/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/util.c b/src/core/util.c index 9e5200c7..df255cfa 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -341,8 +341,8 @@ const JanetKV *janet_dictionary_next(const JanetKV *kvs, size_t cap, const Janet /* Compare a janet string with a cstring. More efficient than loading * c string as a janet string. */ int janet_cstrcmp(const uint8_t *str, const char *other) { - int32_t len = janet_string_length(str); - int32_t index; + size_t len = janet_string_length(str); + size_t index; for (index = 0; index < len; index++) { uint8_t c = str[index]; uint8_t k = ((const uint8_t *)other)[index];