You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Merge pull request #24585 from Xrayez/fix-crash-hex-number
Fix crash when checking empty string for valid hex number
This commit is contained in:
@@ -3578,9 +3578,12 @@ bool String::is_valid_integer() const {
|
|||||||
|
|
||||||
bool String::is_valid_hex_number(bool p_with_prefix) const {
|
bool String::is_valid_hex_number(bool p_with_prefix) const {
|
||||||
|
|
||||||
int from = 0;
|
|
||||||
int len = length();
|
int len = length();
|
||||||
|
|
||||||
|
if (len == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
int from = 0;
|
||||||
if (len != 1 && (operator[](0) == '+' || operator[](0) == '-'))
|
if (len != 1 && (operator[](0) == '+' || operator[](0) == '-'))
|
||||||
from++;
|
from++;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user