Replace strcpy(buf, "")

This commit is contained in:
Ryan Dwyer
2023-05-08 21:29:42 +10:00
parent 0449bfa4d8
commit 4a9075d9f7
3 changed files with 4 additions and 5 deletions
+3 -3
View File
@@ -432,7 +432,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label)
}
if (g_AmMenus[g_AmIndex].invindexes[slot] >= invGetCount()) {
strcpy(label, "");
label[0] = '\0';
} else {
if (invGetWeaponNumByIndex(g_AmMenus[g_AmIndex].invindexes[slot]) == WEAPON_CLOAKINGDEVICE) {
// Special case: "Cloak %d"
@@ -458,7 +458,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label)
}
break;
case 1: // Function screen
strcpy(label, "");
label[0] = '\0';
if (slot == 4) {
strcpy(label, langGet(L_MISC_171)); // "Function"
@@ -486,7 +486,7 @@ void amGetSlotDetails(s32 slot, u32 *flags, char *label)
}
break;
default: // Orders screen
strcpy(label, "");
label[0] = '\0';
if (g_MissionConfig.iscoop) {
if (slot == 4) {
-1
View File
@@ -2248,7 +2248,6 @@ static Gfx *menuitemSliderRender(Gfx *gdl, struct menurendercontext *context)
gdl = textRenderProjected(gdl, &x, &y, label, g_CharsHandelGothicSm, g_FontHandelGothicSm, colour, context->width, context->height, 0, 0);
if ((context->item->flags & MENUITEMFLAG_SLIDER_HIDEVALUE) == 0) {
strcpy(buffer, "");
sprintf(buffer, "%d\n", slidervalue);
if (context->item->handler != NULL) {
+1 -1
View File
@@ -468,7 +468,7 @@ void mpInit(void)
g_MpSetup.fileguid.fileid = 0;
g_MpSetup.fileguid.deviceserial = 0;
strcpy(g_MpSetup.name, "");
g_MpSetup.name[0] = '\0';
for (i = 0; i < 6; i++) {
mpPlayerSetDefaults(i, false);