diff options
author | Jonas Baggett <jonasb@tranquille.ch> | 2016-08-03 14:36:43 +0200 |
---|---|---|
committer | Jonas Baggett <jonasb@tranquille.ch> | 2016-08-03 15:40:01 +0200 |
commit | 5906b80a3c2f21f8b717cb92bd18958aa7be3871 (patch) | |
tree | 9a9a47915bdab9b2612ccd13f31ad4573ae11001 /src/grt | |
parent | 27b09fc457c10067f5aaa77ed150628095060751 (diff) | |
download | ghdl-5906b80a3c2f21f8b717cb92bd18958aa7be3871.tar.gz ghdl-5906b80a3c2f21f8b717cb92bd18958aa7be3871.tar.bz2 ghdl-5906b80a3c2f21f8b717cb92bd18958aa7be3871.zip |
Fix a bug when opening the wave option file provided.
Diffstat (limited to 'src/grt')
-rw-r--r-- | src/grt/grt-wave_opt_file-parse.adb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/grt/grt-wave_opt_file-parse.adb b/src/grt/grt-wave_opt_file-parse.adb index 18d29fe37..7c6537b4f 100644 --- a/src/grt/grt-wave_opt_file-parse.adb +++ b/src/grt/grt-wave_opt_file-parse.adb @@ -330,11 +330,14 @@ package body Grt.Wave_Opt_File.Parse is is Mode : constant String := "rt" & ASCII.Nul; Stream : FILEs; + Option_File_C : String (1 .. Option_File'Length + 1); begin - Stream := fopen (Option_File'Address, Mode'Address); + Option_File_C (1 .. Option_File'Length) := Option_File; + Option_File_C (Option_File_C'Last) := ASCII.Nul; + Stream := fopen (Option_File_C'Address, Mode'Address); if Stream = NULL_Stream then Error_C ("cannot open '"); - Error_C (Option_File (Option_File'First .. Option_File'Last - 1)); + Error_C (Option_File); Error_E ("'"); end if; return Stream; |