Fixed empty string deserialization

This commit is contained in:
Yuriy Glukhov 2018-08-06 18:32:42 +03:00 committed by zah
parent 961cc48b11
commit 06e516e709
1 changed files with 4 additions and 3 deletions

View File

@ -329,6 +329,7 @@ proc readImpl[E](rlp: var Rlp, T: type seq[E]): T =
when E is (byte or char):
var bytes = rlp.toBytes
if bytes.len != 0:
result = newSeq[byte](bytes.len)
copyMem(addr result[0], bytes.baseAddr, bytes.len)
rlp.skipElem