Handle missing arguments to filter/paint in tiletypes

develop
lethosor 2014-05-11 14:10:09 -04:00
parent cca8014630
commit b166f51568
1 changed files with 6 additions and 0 deletions

@ -500,6 +500,12 @@ bool tryVariant(std::string value, TileType &paint)
bool processTileType(color_ostream & out, TileType &paint, std::vector<std::string> &params, int start, int end)
{
if (start == end)
{
out << "Missing argument." << std::endl;
return false;
}
int loc = start;
std::string option = params[loc++];
std::string value = end <= loc ? "" : params[loc++];