aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parseTools.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index c0c8608c..ddfb9d01 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1520,8 +1520,8 @@ function getFastValue(a, op, b, type) {
}
return '(Math.imul(' + a + ',' + b + ')|0)';
}
- } else {
- if (a == '0') {
+ } else { // div
+ if (a == '0' && !(type in Runtime.FLOAT_TYPES)) { // careful on floats, since 0*NaN is not 0
return '0';
} else if (b == 1) {
return a;