diff options
-rw-r--r-- | makefs.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -5,7 +5,9 @@ // 4-byte little-endian size of the file and then the contents // of the file and then another null-padding until a 4-aligned offset. // Files encoded this way go one after another (so it's easy to add -// something at the end or at the beginning). +// something at the beginning). +// At the and comes one null-byte (as if a file with empty name +// was there). #include <stdint.h> #include <sys/types.h> @@ -87,6 +89,9 @@ int main(int argc, char **argv) errx(-1, "error writing to stdout"); } + if (putchar('\0')) + errx(-1, "error writing to stdout"); + return 0; } |