Zero length byte sequences are fine
This commit is contained in:
parent
53981fd70a
commit
c915accf7d
|
@ -1,6 +1,6 @@
|
|||
# Package
|
||||
|
||||
version = "20230913"
|
||||
version = "20230914"
|
||||
author = "Emery Hemingway"
|
||||
description = "data model and serialization format"
|
||||
license = "Unlicense"
|
||||
|
|
|
@ -674,8 +674,6 @@ proc decodePreserves*(s: Stream; E = void): Preserve[E] =
|
|||
let n = s.readData(addr data[0], data.len)
|
||||
if n != data.len:
|
||||
raise newException(IOError, "short read")
|
||||
else:
|
||||
raiseAssert "readVarint returned zero"
|
||||
result = Preserve[E](kind: pkByteString, bytes: data)
|
||||
of 0xb3:
|
||||
var data = newString(s.readVarint())
|
||||
|
|
Loading…
Reference in New Issue