we fail tests when not reading spell components.

This commit is contained in:
Enno Rehling 2018-05-06 14:02:44 +02:00
parent a44085de7a
commit adbf1098b9
2 changed files with 8 additions and 2 deletions

View file

@ -277,7 +277,13 @@ static void XMLCALL start_spells(parseinfo *pi, const XML_Char *el, const XML_Ch
const char *flag_names[] = {
"far", "variable", "ocean", "ship", "los",
"unittarget", "shiptarget", "buildingtarget", "regiontarget", NULL };
if (xml_strcmp(el, "spell") == 0) {
if (xml_strcmp(el, "resource") == 0) {
spell_component *spc = NULL;
(void)spc;
handle_bad_input(pi, el, NULL);
}
else if (xml_strcmp(el, "spell") == 0) {
spell *sp;
const XML_Char *name = NULL, *syntax = NULL, *parameter = NULL;
int i, rank = 0, flags = 0;

View file

@ -1706,11 +1706,11 @@ void register_xmlreader(void)
xml_register_callback(parse_buildings);
xml_register_callback(parse_ships);
xml_register_callback(parse_spellbooks);
xml_register_callback(parse_spells);
#endif
xml_register_callback(parse_races);
xml_register_callback(parse_equipment);
xml_register_callback(parse_spells);
xml_register_callback(parse_strings);
xml_register_callback(parse_messages);