aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-28 13:39:04 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-28 13:39:04 -0800
commit406dac27c1a81c1962365983d42f00577889b555 (patch)
tree8149650c97184f4c00a1650af213f273bcf6cfbb
parentc2f903c0f66ab2733aaaafeccb87b4e5253c421d (diff)
fix arbitrary int parsing bug
-rw-r--r--src/parseTools.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 635fa411..d4ef27eb 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -605,7 +605,7 @@ function makeCopyI64(value) {
function parseArbitraryInt(str, bits) {
// We parse the string into a vector of digits, base 10. This is convenient to work on.
- assert(('i' + (bits % 32)) in Runtime.INT_TYPES, 'Arbitrary-sized ints must tails that are of legal size');
+ assert(bits % 32 == 0 || ('i' + (bits % 32)) in Runtime.INT_TYPES, 'Arbitrary-sized ints must tails that are of legal size');
function str2vec(s) { // index 0 is the highest value
var ret = [];