Use the correct slicing for rQshiftStr
This didn't result in any error however since slice() handles such mistakes gracefully.
This commit is contained in:
parent
178b92d380
commit
4318c8cafd
@ -104,7 +104,7 @@ Websock.prototype = {
|
|||||||
let str = "";
|
let str = "";
|
||||||
// Handle large arrays in steps to avoid long strings on the stack
|
// Handle large arrays in steps to avoid long strings on the stack
|
||||||
for (let i = 0; i < len; i += 4096) {
|
for (let i = 0; i < len; i += 4096) {
|
||||||
let part = arr.slice(i, i + Math.min(4096, len));
|
let part = arr.slice(i, Math.min(i + 4096, len));
|
||||||
str = str.concat(String.fromCharCode.apply(null, part));
|
str = str.concat(String.fromCharCode.apply(null, part));
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user