From 3d771ae92881d253aae30e80a400ba133de08d26 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 16 Jan 2014 15:38:02 -0800 Subject: fix strnlen input of size, which should be unsigned --- src/library.js | 1 + 1 file changed, 1 insertion(+) 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++; -- cgit v1.2.3-18-g5258