mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
SW: Fix -Wrestrict
git-svn-id: https://svn.eduke32.com/eduke32@7561 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5aec94bd60
commit
7ea2d2024b
1 changed files with 9 additions and 3 deletions
|
@ -2587,8 +2587,12 @@ MNU_InputSmallString(char *name, short pix_width)
|
|||
MNU_MeasureSmallString(name, &w, &h);
|
||||
if (w < pix_width)
|
||||
{
|
||||
if (strlen(name) < 256) // Dont let it go too far!
|
||||
sprintf(name, "%s%c", name, ch);
|
||||
size_t const namelen = strlen(name);
|
||||
if (namelen < 256) // Dont let it go too far!
|
||||
{
|
||||
name[namelen] = ch;
|
||||
name[namelen+1] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2687,7 +2691,9 @@ MNU_InputString(char *name, short pix_width)
|
|||
MNU_MeasureString(name, &w, &h);
|
||||
if (w < pix_width)
|
||||
{
|
||||
sprintf(name, "%s%c", name, ch);
|
||||
size_t const namelen = strlen(name);
|
||||
name[namelen] = ch;
|
||||
name[namelen+1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue