From b166f51568ea92138179b44c6949b55c12e816c9 Mon Sep 17 00:00:00 2001 From: lethosor Date: Sun, 11 May 2014 14:10:09 -0400 Subject: [PATCH] Handle missing arguments to filter/paint in tiletypes --- plugins/tiletypes.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/tiletypes.cpp b/plugins/tiletypes.cpp index fd6d3735a..103a2dcfb 100644 --- a/plugins/tiletypes.cpp +++ b/plugins/tiletypes.cpp @@ -500,6 +500,12 @@ bool tryVariant(std::string value, TileType &paint) bool processTileType(color_ostream & out, TileType &paint, std::vector ¶ms, 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++];