fix: parseInt was broken
This commit is contained in:
parent
00aeef5321
commit
bce8b7293c
@ -402,12 +402,13 @@ public class Parsing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
var digit = alphabet.indexOf(Character.toLowerCase(src.at(i + n)));
|
var digit = alphabet.indexOf(Character.toLowerCase(src.at(i + n, '\0')));
|
||||||
if (digit < 0) break;
|
if (digit < 0) break;
|
||||||
|
|
||||||
parsedAny = true;
|
parsedAny = true;
|
||||||
result += digit;
|
|
||||||
result *= alphabet.length();
|
result *= alphabet.length();
|
||||||
|
result += digit;
|
||||||
|
n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parsedAny) {
|
if (!parsedAny) {
|
||||||
@ -415,6 +416,6 @@ public class Parsing {
|
|||||||
return ParseRes.failed();
|
return ParseRes.failed();
|
||||||
}
|
}
|
||||||
else if (negative) return ParseRes.res(-result, n);
|
else if (negative) return ParseRes.res(-result, n);
|
||||||
else return ParseRes.res(-result, n);
|
else return ParseRes.res(result, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user