De-duplicate number of menu text bytes

I've moved this to a define that gets declared in Game.h. I could've
made it a const int, but that's only legal in C++ mode.
This commit is contained in:
Misa
2021-03-06 18:14:44 -08:00
committed by Ethan Lee
parent 40c6a01917
commit 22d71affba
3 changed files with 7 additions and 6 deletions

View File

@@ -6327,7 +6327,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
static const char tmp[] = " ";
prefix = tmp;
}
char text[menutextbytes];
char text[MENU_TEXT_BYTES];
SDL_snprintf(text, sizeof(text), "%s%s", prefix, ed.ListOfMetaData[i].title.c_str());
for (size_t ii = 0; text[ii] != '\0'; ++ii)
{