Give reason to why writing the object file fails

This commit is contained in:
ISSOtm
2020-02-14 00:29:24 +01:00
parent 42faffe6f3
commit 03ed914714

View File

@@ -425,8 +425,8 @@ void out_WriteObject(void)
addexports(); addexports();
f = fopen(tzObjectname, "wb"); f = fopen(tzObjectname, "wb");
if (f == NULL) if (!f)
fatalerror("Couldn't write file '%s'\n", tzObjectname); err(1, "Couldn't write file '%s'", tzObjectname);
fprintf(f, RGBDS_OBJECT_VERSION_STRING, RGBDS_OBJECT_VERSION_NUMBER); fprintf(f, RGBDS_OBJECT_VERSION_STRING, RGBDS_OBJECT_VERSION_NUMBER);
fputlong(RGBDS_OBJECT_REV, f); fputlong(RGBDS_OBJECT_REV, f);