| Index: frog/parser.dart
|
| diff --git a/frog/parser.dart b/frog/parser.dart
|
| index 18fa60ff73d15052e918aedb681f70d43dbc4caa..4d321dacf044d52ca55b39cb4ee75b62c42457e2 100644
|
| --- a/frog/parser.dart
|
| +++ b/frog/parser.dart
|
| @@ -1334,10 +1334,14 @@ class Parser {
|
| static int parseHex(String hex) {
|
| var result = 0;
|
|
|
| - for (int i=0; i < hex.length; i++) {
|
| + for (int i = 0; i < hex.length; i++) {
|
| var digit = _hexDigit(hex.charCodeAt(i));
|
| assert(digit != -1);
|
| - result = (result << 4) + digit;
|
| + // Multiply by 16 rather than shift by 4 since that will result in a
|
| + // correct value for numbers that exceed the 32 bit precision of JS
|
| + // 'integers'.
|
| + // TODO: Figure out a better solution to integer truncation. Issue 638.
|
| + result = (result * 16) + digit;
|
| }
|
|
|
| return result;
|
|
|