diff options
| -rw-r--r-- | src/grt/ghdl_main.adb | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/src/grt/ghdl_main.adb b/src/grt/ghdl_main.adb index c36e1b851..3107da23c 100644 --- a/src/grt/ghdl_main.adb +++ b/src/grt/ghdl_main.adb @@ -45,12 +45,18 @@ is       (Source => System.Address, Target => Grt.Options.Argv_Type);     My_Argv : Grt.Options.Argv_Type := To_Argv_Type (Argv); +   Progname : Ghdl_C_String;  begin     --  Ada elaboration.     Grt_Init;     --  Set the options. -   Grt.Main.Run_Options (My_Argv (0), Argc, My_Argv); +   if Argc > 0 then +      Progname := My_Argv (0); +   else +      Progname := null; +   end if; +   Grt.Main.Run_Options (Progname, Argc, My_Argv);     --  Initialize, elaborate and simulate.     Grt.Main.Run; | 
