Allow to set position at end of stream
This commit is contained in:
parent
25a1987517
commit
4618cb58c0
1 changed files with 1 additions and 1 deletions
|
|
@ -279,7 +279,7 @@ proc ssAtEnd(s: Stream): bool =
|
||||||
|
|
||||||
proc ssSetPosition(s: Stream, pos: int) =
|
proc ssSetPosition(s: Stream, pos: int) =
|
||||||
var s = StringStream(s)
|
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 =
|
proc ssGetPosition(s: Stream): int =
|
||||||
var s = StringStream(s)
|
var s = StringStream(s)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue