diff --git a/src/stdio/putw.c b/src/stdio/putw.c index a6d24292..0ff9d7fb 100644 --- a/src/stdio/putw.c +++ b/src/stdio/putw.c @@ -3,5 +3,5 @@ int putw(int x, FILE *f) { - return fwrite(&x, sizeof x, 1, f) ? x : EOF; + return (int)fwrite(&x, sizeof x, 1, f)-1; }