diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-18 15:29:56 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-18 15:29:56 -0800 |
commit | e6609943557cd6f0a1f2c3dd04bada4285ed0f01 (patch) | |
tree | 754a8c72c00bad14def540e0ef88b00607a5a34a /src/parseTools.js | |
parent | c39afee38bb49a6fce996bbd276065f2f5603178 (diff) |
coerce memset params
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index e73f6140..5f8797b0 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1250,7 +1250,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) || (align < 4 && parseInt(num) >= SEEK_OPTIMAL_ALIGN_MIN)) { - return '_memset(' + getFastValue(ptr, '+', pos) + ', ' + value + ', ' + num + ', ' + align + ')'; + return '_memset(' + asmCoercion(getFastValue(ptr, '+', pos), 'i32') + ', ' + asmCoercion(value, 'i32') + ', ' + asmCoercion(num, 'i32') + ', ' + align + ')'; } num = parseInt(num); value = parseInt(value); |