Fix String::is_valid_integer() for single symbols + and -

This commit is contained in:
allkhor 2016-07-31 00:18:30 +06:00
parent 73f83fadc8
commit 09c4d65b64

View file

@ -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++) {