Skip to content
Snippets Groups Projects
Commit d8d352a1 authored by candelavla's avatar candelavla
Browse files

fix some issues with supername code

parent ac3e9fc9
Branches
No related tags found
No related merge requests found
...@@ -772,12 +772,12 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) ...@@ -772,12 +772,12 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile)
strupr(skin->hudname); strupr(skin->hudname);
SYMBOLCONVERT(skin->hudname) SYMBOLCONVERT(skin->hudname)
} }
else if (!supername) if (!supername)
{ {
char super[7], someone[SKINNAMESIZE+1]; char superstring[SKINNAMESIZE+7];
strcpy(super, "Super "); strcpy(superstring, "Super ");
strcpy(someone, skin->realname); strlcat(superstring, skin->name, sizeof(superstring));
STRBUFCPY(skin->supername, strcat(super, someone)); STRBUFCPY(skin->supername, superstring);
} }
} }
else if (!stricmp(stoken, "supername")) else if (!stricmp(stoken, "supername"))
...@@ -795,10 +795,10 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile) ...@@ -795,10 +795,10 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile)
HUDNAMEWRITE(skin->realname); HUDNAMEWRITE(skin->realname);
if (!supername) //copy over default to capitalise the name if (!supername) //copy over default to capitalise the name
{ {
char super[7], someone[SKINNAMESIZE+1]; char superstring[SKINNAMESIZE+7];
strcpy(super, "Super "); strcpy(superstring, "Super ");
strcpy(someone, skin->realname); strlcat(superstring, skin->realname, sizeof(superstring));
STRBUFCPY(skin->supername, strcat(super, someone)); STRBUFCPY(skin->supername, superstring);
} }
} }
else if (!stricmp(stoken, "hudname")) else if (!stricmp(stoken, "hudname"))
...@@ -930,10 +930,10 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile) ...@@ -930,10 +930,10 @@ void R_PatchSkins(UINT16 wadnum, boolean mainfile)
HUDNAMEWRITE(skin->realname); HUDNAMEWRITE(skin->realname);
if (!supername) //copy over default to capitalise the name if (!supername) //copy over default to capitalise the name
{ {
char super[7], someone[SKINNAMESIZE+1]; char superstring[SKINNAMESIZE+7];
strcpy(super, "Super "); strcpy(superstring, "Super ");
strcpy(someone, skin->realname); strlcat(superstring, skin->realname, sizeof(superstring));
STRBUFCPY(skin->supername, strcat(super, someone)); STRBUFCPY(skin->supername, superstring);
} }
} }
else if (!stricmp(stoken, "hudname")) else if (!stricmp(stoken, "hudname"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment