Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

copy() wrong behavior #1

@marcominetti

Description

@marcominetti

@goldbuick reported:

if (resizeOk && this.pos >= this.buffer.length) {
var newBuffer = new Buffer(this.buffer.length * 2);
this.buffer.copy(newBuffer);
this.buffer = newBuffer;
}

also I encountered a bug here. this.buffer.copy doesn't handle default params properly in the browser. thus, it fills the newBuffer with zeros instead of the data from this.buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions