mirror of
https://github.com/CryptKeeperZK/ffjavascript.git
synced 2026-05-03 03:00:11 -04:00
Fix slice return
This commit is contained in:
@@ -5112,7 +5112,7 @@ class BigBuffer {
|
||||
// bytes to copy from this page
|
||||
const l = (o+r > PAGE_SIZE) ? (PAGE_SIZE -o) : r;
|
||||
const srcView = new Uint8Array(this.buffers[p].buffer, this.buffers[p].byteOffset+o, l);
|
||||
if (l == len) return srcView;
|
||||
if (l == len) return srcView.slice();
|
||||
if (!buff) {
|
||||
if (len <= PAGE_SIZE) {
|
||||
buff = new Uint8Array(len);
|
||||
|
||||
@@ -30,7 +30,7 @@ export default class BigBuffer {
|
||||
// bytes to copy from this page
|
||||
const l = (o+r > PAGE_SIZE) ? (PAGE_SIZE -o) : r;
|
||||
const srcView = new Uint8Array(this.buffers[p].buffer, this.buffers[p].byteOffset+o, l);
|
||||
if (l == len) return srcView;
|
||||
if (l == len) return srcView.slice();
|
||||
if (!buff) {
|
||||
if (len <= PAGE_SIZE) {
|
||||
buff = new Uint8Array(len);
|
||||
|
||||
Reference in New Issue
Block a user