diff options
-rw-r--r-- | src/ghdldrv/ghdlmain.adb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ghdldrv/ghdlmain.adb b/src/ghdldrv/ghdlmain.adb index 1b849c75c..402565b9e 100644 --- a/src/ghdldrv/ghdlmain.adb +++ b/src/ghdldrv/ghdlmain.adb @@ -296,6 +296,11 @@ package body Ghdlmain is for I in Args'Range loop Args (I) := new String'(Argument (I)); pragma Assert (Args (I)'First = 1); + if Args (I)'Last < 1 then + Error ("empty argument on the command line (#" + & Natural'Image (I) & ")"); + raise Option_Error; + end if; end loop; -- Expand response files |