Commit 764cf334 authored by Dan Hipschman's avatar Dan Hipschman Committed by Alexandre Julliard

rpcrt4: Use correct count in rpcrt4_conn_np_write.

count is the total count passed into rpcrt4_conn_np_write. If WriteFile does a partial write it would end up writing too much subsequent times through the loop. All tests pass as before.
parent 95c28017
......@@ -392,7 +392,7 @@ static int rpcrt4_conn_np_write(RpcConnection *Connection,
while (bytes_left)
{
DWORD bytes_written;
ret = WriteFile(npc->pipe, buf, count, &bytes_written, NULL);
ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, NULL);
if (!ret || !bytes_written)
break;
bytes_left -= bytes_written;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment