Skip to content

Commit 4db07a1

Browse files
author
Marcus Paulsson
committed
fixed empty hex bug
formatting
1 parent 0f5f3bc commit 4db07a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/string/ustring.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5150,6 +5150,10 @@ bool String::is_valid_hex_number(bool p_with_prefix) const {
51505150
from += 2;
51515151
}
51525152

5153+
if (from == len) {
5154+
return false;
5155+
}
5156+
51535157
for (int i = from; i < len; i++) {
51545158
char32_t c = operator[](i);
51555159
if (is_hex_digit(c)) {

0 commit comments

Comments
 (0)