mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
lib: jslint string_decoder.js
This commit is contained in:
@@ -82,8 +82,8 @@ StringDecoder.prototype.write = function(buffer) {
|
||||
while (this.charLength) {
|
||||
// determine how many remaining bytes this buffer has to offer for this char
|
||||
var available = (buffer.length >= this.charLength - this.charReceived) ?
|
||||
this.charLength - this.charReceived :
|
||||
buffer.length;
|
||||
this.charLength - this.charReceived :
|
||||
buffer.length;
|
||||
|
||||
// add the new bytes to the char buffer
|
||||
buffer.copy(this.charBuffer, this.charReceived, 0, available);
|
||||
|
||||
Reference in New Issue
Block a user