From 1f3b9913f64c03c7243f72b34d197afba69c74c4 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 29 Dec 2015 18:32:17 +0100 Subject: Fix crash on issue9. --- src/vhdl/sem_expr.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vhdl') diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb index 2325a2708..7500a555d 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 -- cgit v1.2.3