mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
parent
52044fd1b1
commit
526c54c979
@ -122,6 +122,7 @@ SlowBuffer.prototype.hexWrite = function(string, offset, length) {
|
||||
if (isNaN(byte)) throw new Error('Invalid hex string');
|
||||
this[offset + i] = byte;
|
||||
}
|
||||
SlowBuffer._charsWritten = i * 2;
|
||||
return i;
|
||||
};
|
||||
|
||||
|
@ -687,3 +687,5 @@ buf.write('0123456789', 'binary');
|
||||
assert.equal(Buffer._charsWritten, 9);
|
||||
buf.write('123456', 'base64');
|
||||
assert.equal(Buffer._charsWritten, 6);
|
||||
buf.write('00010203040506070809', 'hex');
|
||||
assert.equal(Buffer._charsWritten, 18);
|
||||
|
Loading…
Reference in New Issue
Block a user