summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic/slbt_exec_ctx.c')
-rw-r--r--src/logic/slbt_exec_ctx.c7
1 files changed, 2 insertions, 5 deletions
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');
}