Merge branch 'tiletypes-blank-args' of git://github.com/lethosor/dfhack into develop

develop
Alexander Gavrilov 2014-05-12 21:44:31 +04:00
commit 56903b9374
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++];