replace remaining strncat calls with memcpy calls

This commit is contained in:
svdijk 2013-05-13 18:38:37 +02:00
parent 8fad0a9008
commit b08fbb7cbf
3 changed files with 6 additions and 6 deletions

View file

@ -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, "...");
}

View file

@ -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);

View file

@ -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;
}