Empty means error

This commit is contained in:
Matt Nadareski
2016-04-13 14:45:00 -07:00
parent 7db94458c4
commit 436d1a8554

View File

@@ -56,7 +56,7 @@ namespace SabreTools
// First things first, take care of all of the arguments that this could have // First things first, take care of all of the arguments that this could have
_noMD5 = false; _noSHA1 = false; _forceunzip = false; _allfiles = false; _old = false; _noMD5 = false; _noSHA1 = false; _forceunzip = false; _allfiles = false; _old = false;
_name = ""; _desc = ""; _cat = ""; _version = ""; _author = ""; _name = ""; _desc = ""; _cat = ""; _version = ""; _author = ""; _basePath = "";
List<string> inputs = new List<string>(); List<string> inputs = new List<string>();
foreach (string arg in args) foreach (string arg in args)
{ {
@@ -167,6 +167,14 @@ namespace SabreTools
} }
} }
// If we found nothing (error state), show the help and exit
if (_roms.Count == 0)
{
Console.WriteLine();
Build.Help();
return;
}
// Order the roms by name of parent, then name of rom // Order the roms by name of parent, then name of rom
_roms.Sort(delegate (RomData A, RomData B) _roms.Sort(delegate (RomData A, RomData B)
{ {