diff options
author | bptato <nincsnevem662@gmail.com> | 2023-09-15 11:52:26 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-09-15 11:52:26 +0200 |
commit | 73c9788a7bd64a7f74d9e40b8ab5963817dad59e (patch) | |
tree | e9cc21dcda6bcd5c3471602fcec634299856d970 /src/io | |
parent | 2cf74b74d1c57940037d23c4a7b44ba2afd38725 (diff) | |
download | chawan-73c9788a7bd64a7f74d9e40b8ab5963817dad59e.tar.gz |
Fix compilation with --assertions:off
Remove side effects from assert statements. The flag is not used currently, but let's not depend on that.
Diffstat (limited to 'src/io')
-rw-r--r-- | src/io/serialize.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/io/serialize.nim b/src/io/serialize.nim index fd558ba9..bb65d157 100644 --- a/src/io/serialize.nim +++ b/src/io/serialize.nim @@ -320,7 +320,8 @@ proc sread*(stream: Stream, blob: var Blob) = blob.buffer = alloc(blob.size) blob.deallocFun = dealloc if blob.size > 0: - assert stream.readData(blob.buffer, int(blob.size)) == int(blob.size) + let n = stream.readData(blob.buffer, int(blob.size)) + assert n == int(blob.size) func slen*(blob: Blob): int = result += slen(blob.isfile) |