diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-16 15:38:02 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-16 15:41:31 -0800 |
commit | 3d771ae92881d253aae30e80a400ba133de08d26 (patch) | |
tree | accd79b1faef3c5e20038f804b5ce034de9d991a | |
parent | 72972e7102e8a7c94f576e841749d2e7c4b432d0 (diff) |
fix strnlen input of size, which should be unsigned
-rw-r--r-- | src/library.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index eda4a0b7..36a7cd26 100644 --- a/src/library.js +++ b/src/library.js @@ -3830,6 +3830,7 @@ LibraryManager.library = { }, strnlen: function(ptr, num) { + num = num >>> 0; for (var i = 0; i < num; i++) { if ({{{ makeGetValue('ptr', 0, 'i8') }}} == 0) return i; ptr++; |