Skip to content

Commit

Permalink
GLIBCXX_DEBUG: If we run out of hotkeys for construction, print space…
Browse files Browse the repository at this point in the history
… instead of reading arbitrary data..
  • Loading branch information
bdragon28 committed Mar 9, 2014
1 parent b23f30a commit 24c9771
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/construction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ void construction_menu()
}
// print construction name with limited length.
// limit(28) = 30(column len) - 2(letter + ' ').
mvwprintz(w_con, 1 + i, 1, col, "%c %s", hotkeys[current],
// If we run out of hotkeys, just stop assigning them.
mvwprintz(w_con, 1 + i, 1, col, "%c %s", (current < hotkeys.size()) ? hotkeys[current] : ' ',
utf8_substr(available[current].c_str(), 0, 27).c_str());
}

Expand Down

0 comments on commit 24c9771

Please sign in to comment.