diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/translate/translation.adb | 11 |
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; |