From cbf078a030305ac523ecd7472d3c7f32d566d20b Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Mon, 13 Aug 2018 20:41:16 +0200 Subject: [PATCH] fix editor cannot add starting location for > 9 players. previously attempting to place a starting location for side 10 or higher would result in a "invalid location id" error. --- src/editor/palette/location_palette.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/palette/location_palette.cpp b/src/editor/palette/location_palette.cpp index 4e95ae1eb288..186bafdb589a 100644 --- a/src/editor/palette/location_palette.cpp +++ b/src/editor/palette/location_palette.cpp @@ -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); }