chiark / gitweb /
Fix completion checking in Killer Solo.
[sgt-puzzles.git] / obfusc.c
index 0db8aee867f89ee4726faf2c32a9f7d088c39e0c..dc0656c20e4fc4ab19d2b8bb826af0306b0a894d 100644 (file)
--- a/obfusc.c
+++ b/obfusc.c
@@ -114,7 +114,11 @@ int main(int argc, char **argv)
     obfuscate_bitmap(data, datalen * 8, decode);
 
     if (outputmode == BINARY) {
-       fwrite(data, 1, datalen, stdout);
+       int ret = fwrite(data, 1, datalen, stdout);
+        if (ret < 0) {
+            fprintf(stderr, "obfusc: write: %s\n", strerror(errno));
+            return 1;
+        }
     } else {
        int i;
        for (i = 0; i < datalen; i++)