Fix error in arrayBuffer when there are extra bytes (#37)

This commit is contained in:
iatll
2023-12-16 09:42:22 +08:00
committed by GitHub
parent 59caf17eca
commit 707ee7ced1
+1 -1
View File
@@ -399,7 +399,7 @@
} }
} }
if (extraBytes) { if (extraBytes) {
array[i] = s[i]; array[j] = s[i];
buffer = buffer.slice(0, bytes); buffer = buffer.slice(0, bytes);
} }
return buffer; return buffer;