osproc: fixes a long standing buffering bug on Windows
This commit is contained in:
parent
0a4d9aa954
commit
dfaa63e805
1 changed files with 1 additions and 1 deletions
|
|
@ -363,7 +363,7 @@ when defined(Windows) and not defined(useNimRtl):
|
||||||
# TRUE and n (>0) bytes returned (good data).
|
# TRUE and n (>0) bytes returned (good data).
|
||||||
# FALSE and bytes returned undefined (system error).
|
# FALSE and bytes returned undefined (system error).
|
||||||
if a == 0 and br != 0: raiseOSError(osLastError())
|
if a == 0 and br != 0: raiseOSError(osLastError())
|
||||||
s.atTheEnd = br < bufLen
|
s.atTheEnd = br == 0 #< bufLen
|
||||||
result = br
|
result = br
|
||||||
|
|
||||||
proc hsWriteData(s: Stream, buffer: pointer, bufLen: int) =
|
proc hsWriteData(s: Stream, buffer: pointer, bufLen: int) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue