mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-27 06:42:23 +00:00
use snprintf in unix/system
This commit is contained in:
parent
fae078745f
commit
9f2f249aaa
1 changed files with 2 additions and 2 deletions
|
@ -278,7 +278,7 @@ Sys_FindFirst(char *path, unsigned musthave, unsigned canhave)
|
||||||
{
|
{
|
||||||
if ((strcmp(d->d_name, ".") != 0) || (strcmp(d->d_name, "..") != 0))
|
if ((strcmp(d->d_name, ".") != 0) || (strcmp(d->d_name, "..") != 0))
|
||||||
{
|
{
|
||||||
sprintf(findpath, "%s/%s", findbase, d->d_name);
|
snprintf(findpath, sizeof(findpath), "%s/%s", findbase, d->d_name);
|
||||||
return findpath;
|
return findpath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ Sys_FindNext(unsigned musthave, unsigned canhave)
|
||||||
{
|
{
|
||||||
if ((strcmp(d->d_name, ".") != 0) || (strcmp(d->d_name, "..") != 0))
|
if ((strcmp(d->d_name, ".") != 0) || (strcmp(d->d_name, "..") != 0))
|
||||||
{
|
{
|
||||||
sprintf(findpath, "%s/%s", findbase, d->d_name);
|
snprintf(findpath, sizeof(findpath), "%s/%s", findbase, d->d_name);
|
||||||
return findpath;
|
return findpath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue