Skip to content

Commit 3d771ae

Browse files
committed
fix strnlen input of size, which should be unsigned
1 parent 72972e7 commit 3d771ae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/library.js

+1
Original file line numberDiff line numberDiff line change
@@ -3830,6 +3830,7 @@ LibraryManager.library = {
38303830
},
38313831

38323832
strnlen: function(ptr, num) {
3833+
num = num >>> 0;
38333834
for (var i = 0; i < num; i++) {
38343835
if ({{{ makeGetValue('ptr', 0, 'i8') }}} == 0) return i;
38353836
ptr++;

0 commit comments

Comments
 (0)