Allow to set position at end of stream

This commit is contained in:
Federico Omoto
2015-06-09 22:25:31 -03:00
parent 25a1987517
commit 4618cb58c0

View File

@@ -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)