Skip to content

Commit

Permalink
fix editor cannot add starting location for > 9 players.
Browse files Browse the repository at this point in the history
previously attempting to place a starting location for side 10 or higher would result in a "invalid location id" error.
  • Loading branch information
gfgtdf authored and sevu committed Aug 22, 2018
1 parent 087a18a commit cbf078a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor/palette/location_palette.cpp
Expand Up @@ -242,7 +242,7 @@ void location_palette::adjust_size(const SDL_Rect& target)
button_add_.reset(new location_palette_button(video(), SDL_Rect{ target.x , bottom -= button_y, target.w - 10, button_height }, _("Add"), [this]() {
std::string newid;
if (gui2::dialogs::edit_text::execute(_("New Location Identifier"), "", newid)) {
static const boost::regex valid_id("[a-zA-Z_]+");
static const boost::regex valid_id("[a-zA-Z0-9_]+");
if(boost::regex_match(newid, valid_id)) {
add_item(newid);
}
Expand Down

0 comments on commit cbf078a

Please sign in to comment.