Skip to content

Commit

Permalink
avoid warnings for truncated writing
Browse files Browse the repository at this point in the history
  • Loading branch information
atupone committed Apr 28, 2024
1 parent 8f5dec4 commit 9e9f986
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bzflag/InputMenu.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ InputMenu::InputMenu() : keyboardMapMenu(nullptr), joystickTestMenu(nullptr)
char percentText[5];
for(i = 25; i <= 100; ++i)
{
snprintf(percentText, 5, "%i%%", i);
snprintf(percentText, 5, "%hhi%%", i);
options->push_back(percentText);
}
for (i = 0; i < (int)options->size(); i++)
Expand All @@ -123,7 +123,7 @@ InputMenu::InputMenu() : keyboardMapMenu(nullptr), joystickTestMenu(nullptr)
options = &option->getList();
for(i = 0; i <= 20; ++i)
{
snprintf(percentText, 5, "%i%%", i);
snprintf(percentText, 5, "%hhi%%", i);
options->push_back(percentText);
}
for (i = 0; i < (int)options->size(); i++)
Expand Down

0 comments on commit 9e9f986

Please sign in to comment.