[DATFromDir] Fix malformatted output

This commit is contained in:
Matt Nadareski
2016-09-14 11:15:11 -07:00
parent b5307b79c3
commit 909a01cf18

View File

@@ -325,13 +325,13 @@ namespace SabreTools
lastparent = rom.Machine.Name; lastparent = rom.Machine.Name;
} }
} }
}
// If we had roms but not blanks (and not in Romba mode), create an artifical rom for the purposes of outputting // If we had roms but not blanks (and not in Romba mode), create an artifical rom for the purposes of outputting
if (lastparent != null && _datdata.Files.Count == 0) if (!_datdata.Romba && lastparent != null && _datdata.Files.Count == 0)
{ {
_datdata.Files.Add("temp", new List<Rom>()); _datdata.Files.Add("temp", new List<Rom>());
} }
}
// Now write the final piece and close the output stream // Now write the final piece and close the output stream
DatTools.WriteFooter(sw, _datdata.OutputFormat, _datdata, 0, _logger); DatTools.WriteFooter(sw, _datdata.OutputFormat, _datdata, 0, _logger);