mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-22 01:35:31 -05:00
Streams: return buffers from ReadStream#readBuffer, not strings
This commit is contained in:
parent
5cee3b401f
commit
e91c4c5260
|
|
@ -260,7 +260,7 @@ export class ReadStream {
|
|||
|
||||
async readBuffer(byteCount: number | null = null) {
|
||||
await this.loadIntoBuffer(byteCount, true);
|
||||
const out = this.peek(byteCount) as Buffer | null;
|
||||
const out = this.peekBuffer(byteCount);
|
||||
if (byteCount === null || byteCount >= this.bufSize) {
|
||||
this.bufStart = 0;
|
||||
this.bufEnd = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user