From 2691fe73dbf4bd16f98211830460041ef37f16bc Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 19 Mar 2016 18:13:59 -0400 Subject: slbt_get_exec_ctx(): only initialize aobjname and ltobjname in compile mode. --- src/logic/slbt_exec_ctx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c index a8afe76..5a61e24 100644 --- a/src/logic/slbt_exec_ctx.c +++ b/src/logic/slbt_exec_ctx.c @@ -193,7 +193,7 @@ int slbt_get_exec_ctx( ictx->ctx.lout[1] = &ictx->ctx.argv[i++]; /* output file name */ - if (ref) { + if (ref && ((dctx->cctx->mode == SLBT_MODE_COMPILE))) { *ictx->ctx.lout[0] = "-o"; *ictx->ctx.lout[1] = ch; ictx->ctx.lobjname = ch; @@ -215,10 +215,7 @@ int slbt_get_exec_ctx( strcpy(ch,ictx->ctx.aobjname); if ((ch = strrchr(ch,'.'))) - ch += sprintf(ch,"%s", - (dctx->cctx->mode == SLBT_MODE_COMPILE) - ? ".lo" - : ".la") + ch += sprintf(ch,"%s",".lo") + sizeof('\0'); } -- cgit v1.2.3