FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Diff.blobToBuffer: consistently use Buffer.byteLength · nodegit/nodegit@a87b573 · GitHub

Repository navigation

Commit a87b573

Browse files
committed
Diff.blobToBuffer: consistently use Buffer.byteLength
1 parent da71a29 commit a87b573

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/diff.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Diff.blobToBuffer= function(
7272
var bufferLength;
7373
if (buffer instanceof Buffer) {
7474
bufferText = buffer.toString("utf8");
75-
bufferLength = buffer.length;
75+
bufferLength = Buffer.byteLength(buffer, "utf8");
7676
} else {
7777
bufferText = buffer;
7878
bufferLength = !buffer ? 0 : Buffer.byteLength(buffer, "utf8");

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL