mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-09-06 18:41:00 -04:00
Replace strcpy(buf, "")
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user