address code review

This commit is contained in:
Yui T 2014-11-25 10:19:29 -08:00
parent 3d572d14ca
commit 123b2ebda7

View File

@ -760,11 +760,7 @@ module ts {
while (true) {
var ch = text.charCodeAt(pos);
var valueOfCh = ch - CharacterCodes._0;
if (!isDigit(ch)) {
break;
}
// We know at this point that ch must be digit
if (valueOfCh >= base) {
if (!isDigit(ch) || valueOfCh >= base) {
break;
}
value = value * base + valueOfCh;