uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit e00e74b9d043fef03a3692251fb792eabfcb4cd9
parent fec233db2ab232a1ef3eaba7d954dcf2171337eb
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Mon,  9 May 2022 21:13:28 +0100

(uxnasm) Raise an error if the output rom would be empty.

Diffstat:
Msrc/uxnasm.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/uxnasm.c b/src/uxnasm.c @@ -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;