aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-03 23:02:01 -0500
committerAlon Zakai <alonzakai@gmail.com>2013-12-03 23:02:01 -0500
commit0ff8a5bc4f8a6134675e961a3b0d1433ad9e4940 (patch)
tree9162f71f68a550a24c1e8c9fac024633c0391b41 /src/parseTools.js
parent4cc21b3dc4807aee3b9069367a8e6708a52474e1 (diff)
fix memset return value in makeSetValues
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index ffd7c758..ff981264 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1454,7 +1454,7 @@ function makeSetValues(ptr, pos, value, type, num, align) {
// If we don't know how to handle this at compile-time, or handling it is best done in a large amount of code, call memset
// TODO: optimize the case of numeric num but non-numeric value
if (!isNumber(num) || !isNumber(value) || (parseInt(num)/align >= UNROLL_LOOP_MAX)) {
- return '_memset(' + asmCoercion(getFastValue(ptr, '+', pos), 'i32') + ', ' + asmCoercion(value, 'i32') + ', ' + asmCoercion(num, 'i32') + ')';
+ return '_memset(' + asmCoercion(getFastValue(ptr, '+', pos), 'i32') + ', ' + asmCoercion(value, 'i32') + ', ' + asmCoercion(num, 'i32') + ')|0';
}
num = parseInt(num);
value = parseInt(value);