diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-09-22 18:45:08 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-09-22 18:45:08 +0200 |
commit | 50be65bf4314d9b3c5888f5f02d6ffae504aae7a (patch) | |
tree | cc50e5957fcf9481b5b60919869a20e60b34c2df /core/ustring.cpp | |
parent | 2e065d8ad07bb20fede0d0c0b2d33d6628033024 (diff) | |
download | redot-engine-50be65bf4314d9b3c5888f5f02d6ffae504aae7a.tar.gz |
Changed some code found by Clang Tidy and Coverity
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'; |