From 4106dfd526d08ab82cac725b08381377986ce6d5 Mon Sep 17 00:00:00 2001 From: cuz Date: Thu, 22 Jan 2004 21:13:01 +0000 Subject: [PATCH] Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@2875 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cl65/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cl65/main.c b/src/cl65/main.c index a9a5ba85a..81e7de633 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -288,13 +288,13 @@ static void SetTargetFiles (void) /* Set the startup file */ TargetCRT0 = xmalloc (TargetNameLen + 2 + 1); - strcpy (TargetCRT0, TargetName); - strcat (TargetCRT0, ".o"); + memcpy (TargetCRT0, TargetName, TargetNameLen); + strcpy (TargetCRT0 + TargetNameLen, ".o"); /* Set the library file */ TargetLib = xmalloc (TargetNameLen + 4 + 1); - strcpy (TargetLib, TargetName); - strcat (TargetLib, ".lib"); + memcpy (TargetLib, TargetName, TargetNameLen); + strcpy (TargetLib + TargetNameLen, ".lib"); } } @@ -349,7 +349,7 @@ static void Link (void) CmdAddArg2 (&LD65, "-C", LinkerConfig); } else if (Module) { CmdSetTarget (&LD65, TGT_MODULE); - } else if (Target != TGT_NONE) { + } else { CmdSetTarget (&LD65, Target); } -- 2.39.5