Fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@2875 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-01-22 21:13:01 +00:00
parent 51aec21c23
commit 4106dfd526

View File

@@ -288,13 +288,13 @@ static void SetTargetFiles (void)
/* Set the startup file */ /* Set the startup file */
TargetCRT0 = xmalloc (TargetNameLen + 2 + 1); TargetCRT0 = xmalloc (TargetNameLen + 2 + 1);
strcpy (TargetCRT0, TargetName); memcpy (TargetCRT0, TargetName, TargetNameLen);
strcat (TargetCRT0, ".o"); strcpy (TargetCRT0 + TargetNameLen, ".o");
/* Set the library file */ /* Set the library file */
TargetLib = xmalloc (TargetNameLen + 4 + 1); TargetLib = xmalloc (TargetNameLen + 4 + 1);
strcpy (TargetLib, TargetName); memcpy (TargetLib, TargetName, TargetNameLen);
strcat (TargetLib, ".lib"); strcpy (TargetLib + TargetNameLen, ".lib");
} }
} }
@@ -349,7 +349,7 @@ static void Link (void)
CmdAddArg2 (&LD65, "-C", LinkerConfig); CmdAddArg2 (&LD65, "-C", LinkerConfig);
} else if (Module) { } else if (Module) {
CmdSetTarget (&LD65, TGT_MODULE); CmdSetTarget (&LD65, TGT_MODULE);
} else if (Target != TGT_NONE) { } else {
CmdSetTarget (&LD65, Target); CmdSetTarget (&LD65, Target);
} }