From 09c4d65b64892f945aeb98a4abcedab42126c248 Mon Sep 17 00:00:00 2001 From: allkhor Date: Sun, 31 Jul 2016 00:18:30 +0600 Subject: [PATCH] Fix String::is_valid_integer() for single symbols + and - --- core/ustring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ustring.cpp b/core/ustring.cpp index 6788ada1bba..0d887210c3b 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