mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Output error msg when object file can't be opened
In rgbasm, output a fatal error if the destination object file can't be opened. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -522,8 +522,14 @@ void out_WriteObject(void)
|
|||||||
|
|
||||||
addexports();
|
addexports();
|
||||||
|
|
||||||
|
/* If no path specified, don't write file */
|
||||||
|
if (tzObjectname == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
f = fopen(tzObjectname, "wb");
|
f = fopen(tzObjectname, "wb");
|
||||||
if (f != NULL) {
|
if (f == NULL)
|
||||||
|
fatalerror("Couldn't write file '%s'\n", tzObjectname);
|
||||||
|
|
||||||
struct PatchSymbol *pSym;
|
struct PatchSymbol *pSym;
|
||||||
struct Section *pSect;
|
struct Section *pSect;
|
||||||
|
|
||||||
@@ -546,7 +552,6 @@ void out_WriteObject(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user