diff --git a/source/gui.cpp b/source/gui.cpp index 07c51ce..c35464c 100644 --- a/source/gui.cpp +++ b/source/gui.cpp @@ -156,7 +156,7 @@ void Gui::DisplayWarnMsg(std::string Text) } void Gui::DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth) { - Gui::DrawString((currentScreen ? 200 : 160)+x-(std::min(maxWidth, (int)Gui::GetStringWidth(size, Text))/2), y, size, color, Text, maxWidth); + Gui::DrawString((currentScreen ? 200 : 160)+x-((maxWidth == 0 ? (int)Gui::GetStringWidth(size, Text) : std::min(maxWidth, (int)Gui::GetStringWidth(size, Text)))/2), y, size, color, Text, maxWidth); } // Draw String or Text.