From 5cf3b0977b4282257a2777be0d53038cbab5d922 Mon Sep 17 00:00:00 2001 From: Zeex Date: Tue, 5 Aug 2014 00:03:13 +0700 Subject: [PATCH] Add missing quotes around #file names in preprocessor output --- source/compiler/sc1.c | 4 ++-- source/compiler/sc4.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index a2edc74..b2d315b 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -493,9 +493,9 @@ int pc_compile(int argc, char *argv[]) strcpy(inpfname,sname); /* avoid invalid filename */ error(100,sname); } /* if */ - pc_writesrc(ftmp,(unsigned char*)"#file "); + pc_writesrc(ftmp,(unsigned char*)"#file \""); pc_writesrc(ftmp,(unsigned char*)sname); - pc_writesrc(ftmp,(unsigned char*)"\n"); + pc_writesrc(ftmp,(unsigned char*)"\"\n"); while (!pc_eofsrc(fsrc)) { pc_readsrc(fsrc,tstring,sizeof tstring); pc_writesrc(ftmp,tstring); diff --git a/source/compiler/sc4.c b/source/compiler/sc4.c index a4baafd..30f6190 100644 --- a/source/compiler/sc4.c +++ b/source/compiler/sc4.c @@ -264,9 +264,9 @@ SC_FUNC void setfiledirect(char *name) { if (sc_status==statFIRST && sc_listing) { assert(name!=NULL); - pc_writeasm(outf,"#file "); + pc_writeasm(outf,"#file \""); pc_writeasm(outf,name); - pc_writeasm(outf,"\n"); + pc_writeasm(outf,"\"\n"); } /* if */ }