Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions async_postgres/pg_protocol.nim
Original file line number Diff line number Diff line change
Expand Up @@ -953,9 +953,9 @@ proc parseBackendMessage*(

# Body is the region after type byte and 4-byte length
let bodyStart = 5
let bodyEnd = bodyStart + int(msgLen) - 4 - 1
let bodyLen = int(msgLen) - 4 # msgLen includes the 4-byte length field itself
template body(): untyped =
buf.toOpenArray(bodyStart, bodyEnd)
buf.toOpenArray(bodyStart, bodyStart + bodyLen - 1)

var msg: BackendMessage

Expand Down
Loading