Merge pull request #5976 from allkhor/master

Fix String::is_valid_integer() for single symbols + and -
This commit is contained in:
Rémi Verschelde 2016-07-31 20:07:20 +02:00 committed by GitHub
commit 37ce438787
1 changed files with 1 additions and 1 deletions

View File

@ -3491,7 +3491,7 @@ bool String::is_valid_integer() const {
return false; return false;
int from=0; int from=0;
if (operator[](0)=='+' || operator[](0)=='-') if (len!=1 && (operator[](0)=='+' || operator[](0)=='-'))
from++; from++;
for(int i=from;i<len;i++) { for(int i=from;i<len;i++) {