summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++) {