fixed infinite loop on bad waypoints. now bots will crash down, instead of eating all the ram.

more magic-numbers replacements.
This commit is contained in:
jeefo 2016-02-29 23:50:16 +03:00
commit cd48b98180
7 changed files with 35 additions and 21 deletions

View file

@ -1220,7 +1220,7 @@ char *Localizer::TranslateInput (const char *input)
{
if (strcmp (string, m_langTab[i].original) == 0)
{
strncpy (string, m_langTab[i].translated, 1023);
strncpy (string, m_langTab[i].translated, SIZEOF_CHAR (string));
if (ptr != input)
strncat (string, ptr, 1024 - 1 - strlen (string));