Explorar o código

+ show help when run without any parameters

git-svn-id: branches/z80@44601 -
nickysn %!s(int64=5) %!d(string=hai) anos
pai
achega
fffeb56a55
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      utils/ihx2tzx/ihx2tzx.lpr

+ 7 - 0
utils/ihx2tzx/ihx2tzx.lpr

@@ -63,6 +63,13 @@ var
   NonOptions: TStringArray;
   BasicProgram: AnsiString;
 begin
+  if ParamCount = 0 then
+  begin
+    WriteHelp;
+    Terminate;
+    Exit;
+  end;
+
   // quick check parameters
   ErrorMsg:=CheckOptions(ShortOptions, LongOptions);
   if ErrorMsg<>'' then begin