projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a96d660
)
lib: jslint string_decoder.js
author
Fedor Indutny
<fedor@indutny.com>
Tue, 15 Jul 2014 08:43:59 +0000
(12:43 +0400)
committer
Fedor Indutny
<fedor@indutny.com>
Tue, 15 Jul 2014 08:43:59 +0000
(12:43 +0400)
lib/string_decoder.js
patch
|
blob
|
history
diff --git
a/lib/string_decoder.js
b/lib/string_decoder.js
index
4a45833
..
fd11e51
100644
(file)
--- a/
lib/string_decoder.js
+++ b/
lib/string_decoder.js
@@
-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);