From becc10ce3b3f10b3fade2738a7a6dfe25cb1970a Mon Sep 17 00:00:00 2001 From: Curtis F Kaylor Date: Sat, 16 Nov 2019 12:37:51 -0500 Subject: [PATCH] Fixed a02 Segmentation Fault in Linux --- a02.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/a02.c b/a02.c index 8c3c079..274875d 100644 --- a/a02.c +++ b/a02.c @@ -397,7 +397,7 @@ void asminf(void) { } incnam[incidx] = 0; //Terminate Include Name if (incidx == 0) xerror("INCLUDE requires file name\n", ""); - if (debug) printf("Include File Set to Name to ''\n", incnam); + if (debug) printf("Include File Set to Name to '%s'\n", incnam); } /* Assemble END Pseudo-Op */ @@ -622,6 +622,7 @@ void asmfil(int pass) { blknum = 1; //Initialize Local Block Number orgadr = -1; //Origin Address Not Set curadr = orgadr; //Set Current Address to Origin + if (debug) printf("Rewinding Input File\n"); rewind(inpfil); //Start at Beginning of Input File while (TRUE) { if (incfil) linptr = fgets(inplin, MAXSTR, incfil);