Remove bad varint check
This commit is contained in:
parent
15390dd48e
commit
ab3bd12c11
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "20230912"
|
version = "20230913"
|
||||||
author = "Emery Hemingway"
|
author = "Emery Hemingway"
|
||||||
description = "data model and serialization format"
|
description = "data model and serialization format"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
|
|
|
@ -537,7 +537,6 @@ proc readVarint(s: Stream): uint =
|
||||||
var
|
var
|
||||||
shift = 0
|
shift = 0
|
||||||
c = uint s.readUint8
|
c = uint s.readUint8
|
||||||
if c == 0x80: raise newException(ValueError, "invalid Preserves data")
|
|
||||||
while (c and 0x80) == 0x80:
|
while (c and 0x80) == 0x80:
|
||||||
result = result or ((c and 0x7f) shl shift)
|
result = result or ((c and 0x7f) shl shift)
|
||||||
inc(shift, 7)
|
inc(shift, 7)
|
||||||
|
|
Loading…
Reference in New Issue