summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-07-31 20:07:20 +0200
committerGitHub <noreply@github.com>2016-07-31 20:07:20 +0200
commit37ce4387875e66c1d212c626ba9b4f13e98e6e1c (patch)
tree3132656efb106d9106cb56d09c025c30f26db1a7 /core
parent2b5198b23dde370563719f57d158f4f342263be2 (diff)
parent09c4d65b64892f945aeb98a4abcedab42126c248 (diff)
Merge pull request #5976 from allkhor/master
Fix String::is_valid_integer() for single symbols + and -
Diffstat (limited to 'core')
-rw-r--r--core/ustring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 6788ada1bb..0d887210c3 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3491,7 +3491,7 @@ bool String::is_valid_integer() const {
return false;
int from=0;
- if (operator[](0)=='+' || operator[](0)=='-')
+ if (len!=1 && (operator[](0)=='+' || operator[](0)=='-'))
from++;
for(int i=from;i<len;i++) {