Skip to content

Commit c838fe2

Browse files
committed
Merge pull request godotengine#99059 from MarcusPaulsson/issue_branch_2
Fix String::is_valid_hex_number
2 parents 82c713e + 4db07a1 commit c838fe2

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
@@ -4934,6 +4934,10 @@ bool String::is_valid_hex_number(bool p_with_prefix) const {
49344934
from += 2;
49354935
}
49364936

4937+
if (from == len) {
4938+
return false;
4939+
}
4940+
49374941
for (int i = from; i < len; i++) {
49384942
char32_t c = operator[](i);
49394943
if (is_hex_digit(c)) {

0 commit comments

Comments
 (0)