Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[wmiir] Flush conversion buffer on short read. Closes issue #235.

  • Loading branch information...
commit 4323b0691b5ad4bf2f6796a04af2f46421ff81cc 1 parent e97f133
Kris Maglione authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 cmd/wmiir.c
5 cmd/wmiir.c
View
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.