Fix bug where multiple sampleof attributes could be output, resulting in

invalid XML.
This commit is contained in:
Aaron Giles 2010-09-29 14:44:12 +00:00
parent e1a32f54d8
commit 0cf6785f97

View File

@ -630,6 +630,9 @@ static void print_game_sampleof(FILE *out, const game_driver *game, const machin
/* only output sampleof if different from the game name */
if (cursampname[0] == '*' && strcmp(cursampname + 1, game->name) != 0)
fprintf(out, " sampleof=\"%s\"", xml_normalize_string(cursampname + 1));
/* must stop here, as there can only be one attribute of the same name */
return;
}
}
}