mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 22:10:59 +00:00
replace remaining strncat calls with memcpy calls
This commit is contained in:
parent
8fad0a9008
commit
b08fbb7cbf
3 changed files with 6 additions and 6 deletions
|
@ -192,7 +192,7 @@ Con_Dump_f(void)
|
|||
for ( ; l <= con.current; l++)
|
||||
{
|
||||
line = con.text + (l % con.totallines) * con.linewidth;
|
||||
strncpy(buffer, line, con.linewidth);
|
||||
memcpy(buffer, line, con.linewidth);
|
||||
|
||||
for (x = con.linewidth - 1; x >= 0; x--)
|
||||
{
|
||||
|
@ -702,7 +702,7 @@ Con_DrawConsole(float frac)
|
|||
if (strlen(text) > i)
|
||||
{
|
||||
y = x - i - 11;
|
||||
strncpy(dlbar, text, i);
|
||||
memcpy(dlbar, text, i);
|
||||
dlbar[i] = 0;
|
||||
strcat(dlbar, "...");
|
||||
}
|
||||
|
|
|
@ -560,8 +560,8 @@ Cmd_MacroExpandString(char *text)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
strncpy(temporary, scan, i);
|
||||
strcpy(temporary + i, token);
|
||||
memcpy(temporary, scan, i);
|
||||
memcpy(temporary + i, token, j);
|
||||
strcpy(temporary + i + j, start);
|
||||
|
||||
strcpy(expanded, temporary);
|
||||
|
|
|
@ -718,7 +718,7 @@ COM_FileBase(char *in, char *out)
|
|||
else
|
||||
{
|
||||
s--;
|
||||
strncpy(out, s2 + 1, s - s2);
|
||||
memcpy(out, s2 + 1, s - s2);
|
||||
out[s - s2] = 0;
|
||||
}
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ COM_FilePath(const char *in, char *out)
|
|||
s--;
|
||||
}
|
||||
|
||||
strncpy(out, in, s - in);
|
||||
memcpy(out, in, s - in);
|
||||
out[s - in] = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue