Skip to content

Commit 92c7724

Browse files
authored
Make fallback of regionIndex explicit
1 parent 6aaee21 commit 92c7724

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UI/MainScreen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ void GameButton::Draw(UIContext &dc) {
400400
};
401401
int regionIndex = (int)ginfo->region;
402402
if (regionIndex >= (int)GameRegion::FLAG_COUNT || regionIndex < 0) {
403-
regionIndex = (int)GameRegion::FLAG_COUNT - 1;
403+
regionIndex = (int)GameRegion::UNKNOWN;
404404
}
405405
const AtlasImage *image = dc.Draw()->GetAtlas()->getImage(regionIcons[regionIndex]);
406406
if (image) {

0 commit comments

Comments
 (0)