Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Commit

Permalink
[wmiir] Flush conversion buffer on short read. Closes issue #235.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Maglione committed Sep 20, 2011
1 parent 6594959 commit 0a694fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/wmiir.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,11 @@ xread(int argc, char *argv[]) {
fatal("Can't open file '%s': %r\n", file);

buf = emalloc(fid->iounit);
while((count = ixp_read(fid, buf, fid->iounit)) > 0)
while((count = ixp_read(fid, buf, fid->iounit)) > 0) {
unflush(1, buf, count, binary);
if (!binary && count < fid->iounit)
unflush(1, 0, 0, binary);
}
if(!binary)
unflush(1, 0, 0, binary);
ixp_close(fid);
Expand Down

0 comments on commit 0a694fe

Please sign in to comment.