Merge pull request #5976 from allkhor/master
Fix String::is_valid_integer() for single symbols + and -
This commit is contained in:
commit
37ce438787
|
@ -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++) {
|
||||||
|
|
Loading…
Reference in New Issue