mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +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++)
|
for ( ; l <= con.current; l++)
|
||||||
{
|
{
|
||||||
line = con.text + (l % con.totallines) * con.linewidth;
|
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--)
|
for (x = con.linewidth - 1; x >= 0; x--)
|
||||||
{
|
{
|
||||||
|
@ -702,7 +702,7 @@ Con_DrawConsole(float frac)
|
||||||
if (strlen(text) > i)
|
if (strlen(text) > i)
|
||||||
{
|
{
|
||||||
y = x - i - 11;
|
y = x - i - 11;
|
||||||
strncpy(dlbar, text, i);
|
memcpy(dlbar, text, i);
|
||||||
dlbar[i] = 0;
|
dlbar[i] = 0;
|
||||||
strcat(dlbar, "...");
|
strcat(dlbar, "...");
|
||||||
}
|
}
|
||||||
|
|
|
@ -560,8 +560,8 @@ Cmd_MacroExpandString(char *text)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(temporary, scan, i);
|
memcpy(temporary, scan, i);
|
||||||
strcpy(temporary + i, token);
|
memcpy(temporary + i, token, j);
|
||||||
strcpy(temporary + i + j, start);
|
strcpy(temporary + i + j, start);
|
||||||
|
|
||||||
strcpy(expanded, temporary);
|
strcpy(expanded, temporary);
|
||||||
|
|
|
@ -718,7 +718,7 @@ COM_FileBase(char *in, char *out)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s--;
|
s--;
|
||||||
strncpy(out, s2 + 1, s - s2);
|
memcpy(out, s2 + 1, s - s2);
|
||||||
out[s - s2] = 0;
|
out[s - s2] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -738,7 +738,7 @@ COM_FilePath(const char *in, char *out)
|
||||||
s--;
|
s--;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(out, in, s - in);
|
memcpy(out, in, s - in);
|
||||||
out[s - in] = 0;
|
out[s - in] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue