| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent dcb51b0 commit 10ca3bb
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -392,7 +392,7 @@ added: | |||
| 392 | 392 | * `offset` {integer} The location in the buffer at which to start filling. | |
| 393 | 393 | **Default:** `0` | |
| 394 | 394 | * `length` {integer} The number of bytes to read. **Default:** | |
| 395 | - `buffer.byteLength` | ||
| 395 | + `buffer.byteLength - offset` | ||
| 396 | 396 | * `position` {integer} The location where to begin reading data from the | |
| 397 | 397 | file. If `null`, data will be read from the current file position, and | |
| 398 | 398 | the position will be updated. If `position` is an integer, the current | |
@@ -3119,7 +3119,7 @@ changes: | |||
| 3119 | 3119 | * `options` {Object} | |
| 3120 | 3120 | * `buffer` {Buffer|TypedArray|DataView} **Default:** `Buffer.alloc(16384)` | |
| 3121 | 3121 | * `offset` {integer} **Default:** `0` | |
| 3122 | - * `length` {integer} **Default:** `buffer.byteLength` | ||
| 3122 | + * `length` {integer} **Default:** `buffer.byteLength - offset` | ||
| 3123 | 3123 | * `position` {integer|bigint} **Default:** `null` | |
| 3124 | 3124 | * `callback` {Function} | |
| 3125 | 3125 | * `err` {Error} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -621,7 +621,7 @@ function read(fd, buffer, offset, length, position, callback) { | |||
| 621 | 621 | ({ | |
| 622 | 622 | buffer = Buffer.alloc(16384), | |
| 623 | 623 | offset = 0, | |
| 624 | - length = buffer.byteLength, | ||
| 624 | + length = buffer.byteLength - offset, | ||
| 625 | 625 | position | |
| 626 | 626 | } = options); | |
| 627 | 627 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments