diff --git a/Source/Core/DolphinQt/Achievements/AchievementBox.cpp b/Source/Core/DolphinQt/Achievements/AchievementBox.cpp index 02326d3716..1e524db38f 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementBox.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementBox.cpp @@ -4,6 +4,7 @@ #ifdef USE_RETRO_ACHIEVEMENTS #include "DolphinQt/Achievements/AchievementBox.h" +#include #include #include #include @@ -96,7 +97,9 @@ void AchievementBox::UpdateData() m_progress_bar->setRange(0, 100); m_progress_bar->setValue(m_achievement->measured_percent); m_progress_bar->setTextVisible(false); - m_progress_label->setText(QString::fromUtf8(m_achievement->measured_progress, PROGRESS_LENGTH)); + m_progress_label->setText( + QString::fromUtf8(m_achievement->measured_progress, + qstrnlen(m_achievement->measured_progress, PROGRESS_LENGTH))); m_progress_bar->setVisible(true); } else