From c5670d501f1b47581bda607303e2ffb66a5c1166 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 16 Aug 2022 00:13:07 +0200 Subject: [PATCH] Fix an another sign compare warning. --- core/ustring.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ustring.cpp b/core/ustring.cpp index 685514298..0b8d4d74a 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -1230,14 +1230,14 @@ bool String::is_word_at(const int index, const char *p_str) const { int i = 0; - while (p_str[i] != '\0') { + while (str[i] != '\0') { int iind = index + i; if (iind >= size) { return false; } - if (operator[](iind) != p_str[i]) { + if (operator[](iind) != (CharType)str[i]) { return false; } @@ -1258,7 +1258,7 @@ bool String::is_word_at(const int index, const String &p_str) const { for (int i = 0; i < p_str.length(); ++i) { int iind = index + i; - if (operator[](iind) != p_str[i]) { + if (operator[](iind) != (CharType)p_str[i]) { return false; } }