mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
* Fix #12410, big thanks to @pmetras for this fix * Add testcase
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user