summaryrefslogtreecommitdiff
path: root/std/io/bufio.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/io/bufio.ts')
-rw-r--r--std/io/bufio.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/std/io/bufio.ts b/std/io/bufio.ts
index 4ebec13e1..e4759dcb7 100644
--- a/std/io/bufio.ts
+++ b/std/io/bufio.ts
@@ -486,6 +486,7 @@ export class BufWriter extends AbstractBufBase implements Writer {
this.checkBytesWritten(numBytesWritten);
+ this.buf = new Uint8Array(this.buf.length);
this.usedBufferBytes = 0;
}
@@ -580,6 +581,7 @@ export class BufWriterSync extends AbstractBufBase implements WriterSync {
this.checkBytesWritten(numBytesWritten);
+ this.buf = new Uint8Array(this.buf.length);
this.usedBufferBytes = 0;
}