* Fix #12410, big thanks to @pmetras for this fix

* Add testcase
This commit is contained in:
Clyybber
2020-10-23 03:26:50 +02:00
committed by GitHub
parent 2cb484cefb
commit 01a62320f0
2 changed files with 14 additions and 1 deletions

View File

@@ -242,7 +242,7 @@ proc readDataStr*(s: Stream, buffer: var string, slice: Slice[int]): int =
result = s.readDataStrImpl(s, buffer, slice)
else:
# fallback
result = s.readData(addr buffer[0], buffer.len)
result = s.readData(addr buffer[slice.a], slice.b + 1 - slice.a)
template jsOrVmBlock(caseJsOrVm, caseElse: untyped): untyped =
when nimvm: