I appear to be badly out of practice. Remember to flush the output stream

when mixing printf and write.
This commit is contained in:
Nik Clayton 2001-05-18 14:07:51 +00:00
parent 5b5df07ddc
commit 34da77aac7

View file

@ -72,6 +72,7 @@ main(int argc, char *argv[])
err(1, "ioctl(CONS_SCRSHOT)");
printf("SCRSHOT_%c%c%c%c", VERSION, 2, shot.xsize, shot.ysize);
fflush(stdout);
(void)write(STDOUT_FILENO, shot.buf,
shot.xsize * shot.ysize * sizeof(u_int16_t));