summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold2015-12-29 18:32:17 +0100
committerTristan Gingold2015-12-29 18:33:05 +0100
commit1f3b9913f64c03c7243f72b34d197afba69c74c4 (patch)
tree0bedf9b5b43753f7c0ea9f227797a5d6000fdaea /src
parent2ac84541d494e06b7782cd11515264fd43f7532f (diff)
downloadghdl-1f3b9913f64c03c7243f72b34d197afba69c74c4.tar.gz
ghdl-1f3b9913f64c03c7243f72b34d197afba69c74c4.tar.bz2
ghdl-1f3b9913f64c03c7243f72b34d197afba69c74c4.zip
Fix crash on issue9.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem_expr.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb
index 2325a27..7500a55 100644
--- a/src/vhdl/sem_expr.adb
+++ b/src/vhdl/sem_expr.adb
@@ -2560,9 +2560,9 @@ package body Sem_Expr is
if Pos < E_Pos and then not Has_Others then
Error_No_Choice (Bt, Pos, E_Pos - 1, Get_Location (Arr (I)));
elsif Pos > E_Pos then
- if Pos + 1 = E_Pos then
+ if Pos = E_Pos + 1 then
Error_Msg_Sem
- ("duplicate choice for " & Disp_Discrete (Bt, Pos),
+ ("duplicate choice for " & Disp_Discrete (Bt, E_Pos),
Arr (I));
else
Error_Msg_Sem