Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer.write empty string to end of buffer: regression? #8228

Closed
bryanburgers opened this issue Aug 22, 2016 · 2 comments
Closed

buffer.write empty string to end of buffer: regression? #8228

bryanburgers opened this issue Aug 22, 2016 · 2 comments
Labels
buffer Issues and PRs related to the buffer subsystem. duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@bryanburgers
Copy link

bryanburgers commented Aug 22, 2016

The following code did not throw an exception in v6.3.1 but does in v6.4.0:

'use strict';

const buf = Buffer.alloc(8);

// Write an empty string starting after the last byte of the buffer.
buf.write('', 8, 'utf8');

Reporting because it may be a regression that affects other people.

I'm not sure what should be expected or if this change needs to be documented somewhere. It probably makes complete sense that an exception is thrown, so I am not really questioning whether the way it works in v6.4.0 is correct or not.

@cannibal-kush
Copy link

This is a confirmed bug #8127

@targos targos added duplicate Issues and PRs that are duplicates of other issues or PRs. buffer Issues and PRs related to the buffer subsystem. labels Aug 22, 2016
@targos
Copy link
Member

targos commented Aug 22, 2016

Thanks for the report. Closing as duplicate of #8127
This bug will be fixed in the next release.

@targos targos closed this as completed Aug 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

3 participants