diff --git a/src/dj.c b/src/dj.c index a36123e..7a2512e 100644 --- a/src/dj.c +++ b/src/dj.c @@ -96,8 +96,9 @@ static struct Io * Io_write(struct Io *io) { if ((t = write(io->fd, io->buf, io->bufuse)) < 0) { io->error = errno; t = 0; - } else if (t > 0) + } else if (t > 0) { memmove(io->buf, &(io->buf)[t], (io->bufuse -= t)); + } io->bytes += t; io->prec += (t > 0 && io->bufuse > 0);