From: <dsh...@us...> - 2007-06-28 16:55:12
|
Revision: 1682 http://svn.sourceforge.net/crawl-ref/?rev=1682&view=rev Author: dshaligram Date: 2007-06-28 09:55:09 -0700 (Thu, 28 Jun 2007) Log Message: ----------- Croak if SUBST: argument is malformed. Modified Paths: -------------- trunk/crawl-ref/source/mapdef.cc Modified: trunk/crawl-ref/source/mapdef.cc =================================================================== --- trunk/crawl-ref/source/mapdef.cc 2007-06-28 16:50:32 UTC (rev 1681) +++ trunk/crawl-ref/source/mapdef.cc 2007-06-28 16:55:09 UTC (rev 1682) @@ -112,9 +112,14 @@ std::string substitute = trimmed_string(s.substr(sep + 1)); if (what_to_subst.length() != 1) - return make_stringf("selector '%s' must be exactly one character", - what_to_subst.c_str()); + return make_stringf( + "selector '%s' must be exactly one character in '%s'", + what_to_subst.c_str(), s.c_str()); + if (substitute.empty()) + return make_stringf("no substitute defined in '%s'", + s.c_str()); + *key = what_to_subst[0]; *arg = substitute; *separator = s[sep]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |