mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-10 15:04:59 +00:00
Allow to set position at end of stream
This commit is contained in:
@@ -279,7 +279,7 @@ proc ssAtEnd(s: Stream): bool =
|
||||
|
||||
proc ssSetPosition(s: Stream, pos: int) =
|
||||
var s = StringStream(s)
|
||||
s.pos = clamp(pos, 0, s.data.high)
|
||||
s.pos = clamp(pos, 0, s.data.len)
|
||||
|
||||
proc ssGetPosition(s: Stream): int =
|
||||
var s = StringStream(s)
|
||||
|
||||
Reference in New Issue
Block a user