Merge pull request #3303 from thedax/crashFix

Fix crash with CPU Speed Lock popup.
This commit is contained in:
Henrik Rydgård committed 2013-08-21 09:48:34 -07:00
commit ec5bb37c78
1 file changed
+2 -2
+2 -2
View File
@@ -157,7 +157,7 @@ EventReturn PopupSliderChoice::HandleClick(EventParams &e) {
void PopupSliderChoice::Draw(UIContext &dc) {
Choice::Draw(dc);
char temp[4];
char temp[32];
sprintf(temp, "%i", *value_);
dc.Draw()->DrawText(dc.theme->uiFont, temp, bounds_.x2() - 12, bounds_.centerY(), 0xFFFFFFFF, ALIGN_RIGHT | ALIGN_VCENTER);
}
@@ -170,7 +170,7 @@ EventReturn PopupSliderChoiceFloat::HandleClick(EventParams &e) {
void PopupSliderChoiceFloat::Draw(UIContext &dc) {
Choice::Draw(dc);
char temp[5];
char temp[32];
sprintf(temp, "%2.2f", *value_);
dc.Draw()->DrawText(dc.theme->uiFont, temp, bounds_.x2() - 12, bounds_.centerY(), 0xFFFFFFFF, ALIGN_RIGHT | ALIGN_VCENTER);
}