diff --git a/core/src-c/strutil.c b/core/src-c/strutil.c index 06be599..57d694b 100644 --- a/core/src-c/strutil.c +++ b/core/src-c/strutil.c @@ -12,7 +12,10 @@ bool_t rr_strings_equal(const char *string1, const char *string2) { usz_t index = 0; while(string1[index] == string2[index]) + { if(string1[index] == ZERO) return TRUE; + ++index; + } return FALSE; } @@ -23,6 +26,7 @@ bool_t rr_strings_equal_up_to(const char *string1, const char *string2, usz_t ma { if(string1[index] == ZERO) return TRUE; if(index >= max_length) return TRUE; + ++index; } return FALSE; }