commit - e7247ac567a0c5cabba9ecadbabc0c717d9d6a78
commit + 928df968ad1b4edd1e9111a04827e1c0a614711a
blob - 08ef258c91d82947fc16c1d2ee180be7db6d8dcd
blob + a1ff8b7dca34a8fa4039aa9d9b1841a3a92866f3
--- rom.c
+++ rom.c
/* detect and handle the end of the line */
if (c == '\n') {
- if (n == 0) /* empty line */
- continue;
-
- if (n != 16) /* wrong number of digits */
+ if (n != 16 && n != 0) /* wrong number of digits */
break;
- if (fwrite(&x, sizeof x, 1, fout) == 0)
- err(1, "%s: write error", argv[1]);
+ if (n != 0) /* ignore empty lines */
+ if (fwrite(&x, sizeof x, 1, fout) == 0)
+ err(1, "%s: write error", argv[1]);
line++; /* process next line... */
n = 0;