ref: 03ed9147147c5858a667eeea34e10e2e6a4358d9
parent: 42faffe6f3960ef5d1543e0f1de1abce64c284a4
author: ISSOtm <[email protected]>
date: Thu Feb 13 19:29:24 EST 2020
Give reason to why writing the object file fails
--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -425,8 +425,8 @@
addexports();
f = fopen(tzObjectname, "wb");
- if (f == NULL)
- fatalerror("Couldn't write file '%s'\n", tzObjectname);
+ if (!f)
+ err(1, "Couldn't write file '%s'", tzObjectname);
fprintf(f, RGBDS_OBJECT_VERSION_STRING, RGBDS_OBJECT_VERSION_NUMBER);
fputlong(RGBDS_OBJECT_REV, f);