From 0cf6785f9715f1c9bef50bb1e5e04b0840797bef Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 29 Sep 2010 14:44:12 +0000 Subject: [PATCH] Fix bug where multiple sampleof attributes could be output, resulting in invalid XML. --- src/emu/info.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/emu/info.c b/src/emu/info.c index 9a3fda2ae5b..e4ce467a35b 100644 --- a/src/emu/info.c +++ b/src/emu/info.c @@ -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; } } }