mirror of https://github.com/status-im/nim-rlp.git
Fixed empty string deserialization
This commit is contained in:
parent
961cc48b11
commit
06e516e709
1
rlp.nim
1
rlp.nim
|
@ -329,6 +329,7 @@ proc readImpl[E](rlp: var Rlp, T: type seq[E]): T =
|
||||||
|
|
||||||
when E is (byte or char):
|
when E is (byte or char):
|
||||||
var bytes = rlp.toBytes
|
var bytes = rlp.toBytes
|
||||||
|
if bytes.len != 0:
|
||||||
result = newSeq[byte](bytes.len)
|
result = newSeq[byte](bytes.len)
|
||||||
copyMem(addr result[0], bytes.baseAddr, bytes.len)
|
copyMem(addr result[0], bytes.baseAddr, bytes.len)
|
||||||
rlp.skipElem
|
rlp.skipElem
|
||||||
|
|
Loading…
Reference in New Issue