- don't use 'countof' to iterate through a static array that's defined inside a function. Some GCC versions apparently do not like that.

This commit is contained in:
Christoph Oelckers 2015-04-06 20:59:43 +02:00
parent a013703e1c
commit 7d2ab461d9

View file

@ -433,6 +433,7 @@ void FGameConfigFile::DoKeySetup(const char *gamename)
{ "Bindings", &Bindings },
{ "DoubleBindings", &DoubleBindings },
{ "AutomapBindings", &AutomapBindings },
NULL, NULL
};
const char *key, *value;
@ -442,7 +443,7 @@ void FGameConfigFile::DoKeySetup(const char *gamename)
C_SetDefaultBindings ();
for (int i = 0; i < countof(binders); ++i)
for (int i = 0; binders[i].label != NULL; ++i)
{
strncpy(subsection, binders[i].label, sublen);
if (SetSection(section))