aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-04-27 07:58:04 +0200
committerTristan Gingold <tgingold@free.fr>2019-04-27 07:58:04 +0200
commit58eaa9531816ca832d43ca2cac0618ec91a246e1 (patch)
tree63d1253f9ba9fbb1f667eaca282f238aceccf880
parentc8004bbf5b8f27cbe22f380ffcced02c7a0cd5ee (diff)
downloadghdl-58eaa9531816ca832d43ca2cac0618ec91a246e1.tar.gz
ghdl-58eaa9531816ca832d43ca2cac0618ec91a246e1.tar.bz2
ghdl-58eaa9531816ca832d43ca2cac0618ec91a246e1.zip
translation: adjust scan of vhpidirect string.
-rw-r--r--src/vhdl/translate/translation.adb11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vhdl/translate/translation.adb b/src/vhdl/translate/translation.adb
index 9cc217d7e..fd68e2f84 100644
--- a/src/vhdl/translate/translation.adb
+++ b/src/vhdl/translate/translation.adb
@@ -145,21 +145,20 @@ package body Translation is
end if;
-- Extract library.
Lf := P;
- while P < Length and then Name (P) /= ' ' loop
+ while P <= Length and then Name (P) /= ' ' loop
P := P + 1;
end loop;
- Ll := P;
+ Ll := P - 1;
-- Extract subprogram.
- P := P + 1;
while P <= Length and then Name (P) = ' ' loop
P := P + 1;
end loop;
Sf := P;
- while P < Length and then Name (P) /= ' ' loop
+ while P <= Length and then Name (P) /= ' ' loop
P := P + 1;
end loop;
- Sl := P;
- if P < Length then
+ Sl := P - 1;
+ if P <= Length then
Error_Msg_Sem (+Spec, "garbage at end of VHPIDIRECT");
end if;