Skip to content

Commit

Permalink
fixed files form Closure #128
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 831ea32 commit 588c298
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -782,13 +782,16 @@ private void unrollBinaryOperator(

static boolean isSimpleNumber(String s) {
int len = s.length();
if (len == 0) {
return false;
}
for (int index = 0; index < len; index++) {
char c = s.charAt(index);
if (c < '0' || c > '9') {
return false;
}
}
return len > 0 && s.charAt(0) != '0';
return len == 1 || s.charAt(0) != '0';
}

static double getSimpleNumber(String s) {
Expand Down

0 comments on commit 588c298

Please sign in to comment.