aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-09 18:25:38 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-09 18:25:38 -0800
commit66a79e74a4d01f6cfc6fb8e289a00896e397d12f (patch)
treea98da7c273261d19c5e7f4bd394af90747fe3755 /src
parent3434fa6b560829dd8317e02d0af7fc2f9fb50fee (diff)
fix crash bug in processing a mathop with a param2 without an ident
Diffstat (limited to 'src')
-rw-r--r--src/parseTools.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 220e15f7..22c2f440 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1564,7 +1564,7 @@ function processMathop(item) {
if (item.type[0] === 'i') {
bits = parseInt(item.type.substr(1));
}
- var bitsLeft = parseInt((item.param2 ? item.param2.ident : item.type).substr(1)); // remove i to leave the number of bits left after this operation
+ var bitsLeft = parseInt(((item.param2 && item.param2.ident) ? item.param2.ident : item.type).substr(1)); // remove i to leave the number of bits left after this operation
function integerizeBignum(value) {
return makeInlineCalculation('VALUE-VALUE%1', value, 'tempBigIntI');