Skip to content

Commit

Permalink
src/lstrlib.js: remove extraneous argument to setUint8
Browse files Browse the repository at this point in the history
It doesn't take a littleendian argument

Found via #210 with thanks to @gudzpoz
  • Loading branch information
daurnimator committed Dec 2, 2024
1 parent 4d85f25 commit 6a89083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lstrlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ const unpacknum = function(L, b, islittle, size) {

let dv = new DataView(new ArrayBuffer(size));
for (let i = 0; i < size; i++)
dv.setUint8(i, b[i], islittle);
dv.setUint8(i, b[i]);

if (size == 4) return dv.getFloat32(0, islittle);
else return dv.getFloat64(0, islittle);
Expand Down

0 comments on commit 6a89083

Please sign in to comment.