diff --git a/builtin-merge-file.c b/builtin-merge-file.c
index 58deb62ac08507901c40e89aec0cea7fcdc78f1e..3605960c2d9692514a6df0f344f3c3269cf1de3c 100644 (file)
--- a/builtin-merge-file.c
+++ b/builtin-merge-file.c
}
ret = xdl_merge(mmfs + 1, mmfs + 0, names[0], mmfs + 2, names[2],
- &xpp, XDL_MERGE_ZEALOUS, &result);
+ &xpp, XDL_MERGE_ZEALOUS_ALNUM, &result);
for (i = 0; i < 3; i++)
free(mmfs[i].ptr);
if (!f)
ret = error("Could not open %s for writing", filename);
- else if (fwrite(result.ptr, result.size, 1, f) != 1)
+ else if (result.size &&
+ fwrite(result.ptr, result.size, 1, f) != 1)
ret = error("Could not write to %s", filename);
else if (fclose(f))
ret = error("Could not close %s", filename);