Delete output file if assembly fails.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 10 Dec 2008 03:47:19 -0500
changeset 474 c2d4e63efdd1
parent 473 78c418bde2d2
child 475 ea119c8ce5cd
Delete output file if assembly fails.
assemble.c
--- a/assemble.c	Wed Dec 10 01:54:08 2008 -0500
+++ b/assemble.c	Wed Dec 10 03:47:19 2008 -0500
@@ -69,6 +69,8 @@
                 buf[rc] = '\0';
                 if (assemble(buf, outfile))
                     retval = 0;
+                else
+                    remove(outfile);
                 free(buf);
             } // else
         } // for