diff options
author | Araq <rumpf_a@web.de> | 2015-10-07 09:38:45 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-10-07 10:03:46 +0200 |
commit | dfaa63e80527da55771ac983558c4e267e62f890 (patch) | |
tree | 0354f92779f4d71393dc7eaf1577ab550981769b /lib/pure | |
parent | 0a4d9aa954fccc988c5e133dcd99ba7c97c3a06e (diff) | |
download | Nim-dfaa63e80527da55771ac983558c4e267e62f890.tar.gz |
osproc: fixes a long standing buffering bug on Windows
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/osproc.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index c23126be9..fa20afff0 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -363,7 +363,7 @@ when defined(Windows) and not defined(useNimRtl): # TRUE and n (>0) bytes returned (good data). # FALSE and bytes returned undefined (system error). if a == 0 and br != 0: raiseOSError(osLastError()) - s.atTheEnd = br < bufLen + s.atTheEnd = br == 0 #< bufLen result = br proc hsWriteData(s: Stream, buffer: pointer, bufLen: int) = |