Skip to content

Commit 8794fcd

Browse files
committed
Stop cstring reading on any falsy value
1 parent 544b1ce commit 8794fcd

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ dist
1010
/.eslintcache
1111
.vscode/
1212
manually-test-on-heroku.js
13+
tsconfig.tsbuildinfo

packages/pg-protocol/src/buffer-reader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class BufferReader {
4545
const start = this.offset
4646
let end = start
4747
// eslint-disable-next-line no-empty
48-
while (this.buffer[end++] !== 0) {}
48+
while (this.buffer[end++]) {}
4949
this.offset = end
5050
return this.buffer.toString(this.encoding, start, end - 1)
5151
}

0 commit comments

Comments
 (0)