mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-27 08:13:01 +00:00
(uxnasm) Raise an error if the output rom would be empty.
This commit is contained in:
parent
fec233db2a
commit
e00e74b9d0
1 changed files with 2 additions and 0 deletions
|
@ -435,6 +435,8 @@ main(int argc, char *argv[])
|
|||
return !error("Assembly", "Failed to assemble rom.");
|
||||
if(!(dst = fopen(argv[2], "wb")))
|
||||
return !error("Invalid Output", argv[2]);
|
||||
if(p.length <= TRIM)
|
||||
return !error("Assembly", "Output rom is empty.");
|
||||
fwrite(p.data + TRIM, p.length - TRIM, 1, dst);
|
||||
review(argv[2]);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue