allow to pass empty value to the "unit" debug command. Example: "unit name="

This commit is contained in:
Ali El Gariani 2008-06-13 03:15:52 +00:00
parent 610b5dc284
commit 3086efda50

View file

@ -2894,11 +2894,10 @@ private:
const unit_map::iterator i = menu_handler_.current_unit(mouse_handler_);
if (i == menu_handler_.units_.end()) return;
const std::string data = get_data(1);
std::vector<std::string> parameters = utils::split(data, '=',
utils::REMOVE_EMPTY | utils::STRIP_SPACES);
std::vector<std::string> parameters = utils::split(data, '=', utils::STRIP_SPACES);
if (parameters.size() < 2)
return;
const std::string& name = parameters[0];
const std::string& value = parameters[1];