diff options
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r-- | core/ustring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index fb4bd6d802..237e86aaf1 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -2147,13 +2147,13 @@ int64_t String::to_int(const CharType *p_str, int p_len) { if (c >= '0' && c <= '9') { - if (integer > INT32_MAX / 10) { + if (integer > INT64_MAX / 10) { String number(""); str = p_str; while (*str && str != limit) { number += *(str++); } - ERR_FAIL_V_MSG(sign == 1 ? INT32_MAX : INT32_MIN, "Cannot represent " + number + " as integer, provided value is " + (sign == 1 ? "too big." : "too small.")); + ERR_FAIL_V_MSG(sign == 1 ? INT64_MAX : INT64_MIN, "Cannot represent " + number + " as integer, provided value is " + (sign == 1 ? "too big." : "too small.")); } integer *= 10; integer += c - '0'; |