Buffer.write() should always set Buffer._charsWritten #1633

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@koichik

With 'utf8' and 'ucs2', Buffer.write() sets Buffer._charsWritten property.
But with 'ascii', 'base64', 'binary' and 'hex' (only v0.5), write() doesn't set the property.

This patch for v0.4 branch.
I will fix for 'hex' encoding after v0.4 branch is merged to the master.

Please review.

@ry
ry commented Sep 2, 2011

LGTM

@koichik

Thanks!

@koichik koichik added a commit that referenced this pull request Sep 3, 2011
@koichik koichik buffer: write() should always set _charsWritten.
Refs #1633.
3e853e6
@bnoordhuis
Node.js Foundation member

@koichik: LGTM too, anything holding you back from merging this into master?

@ry
ry commented Sep 8, 2011

@koichik - v0.4 has been merged in 52044fd

@koichik

@ry - Thanks! I'm fixing 'hex' encoding.

@koichik koichik closed this in 526c54c Sep 8, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment