summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--disk-utils/mkfs.cramfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index ac2a308af..23878248c 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -661,7 +661,7 @@ write_data(struct entry *entry, char *base, unsigned int offset) {
if (e->same) {
set_data_offset(e, base, e->same->offset);
e->offset = e->same->offset;
- } else {
+ } else if (e->size) {
set_data_offset(e, base, offset);
e->offset = offset;
offset = do_compress(base, offset, e->name,