aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-12 21:33:30 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-12 21:33:30 +0100
commit7b60fc68cf36f3fb1861f525bfabc78e4f99a036 (patch)
tree118003eaeec7c1cacfc4bca0d01e26be742f517d /src
parent9551aa636be9f2ca830eec5e5192756de335319a (diff)
downloadghdl-7b60fc68cf36f3fb1861f525bfabc78e4f99a036.tar.gz
ghdl-7b60fc68cf36f3fb1861f525bfabc78e4f99a036.tar.bz2
ghdl-7b60fc68cf36f3fb1861f525bfabc78e4f99a036.zip
synth-expr: fix crash with negative values. Fix #1086
Diffstat (limited to 'src')
-rw-r--r--src/synth/synth-expr.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 5d5b57215..c8062e707 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -164,8 +164,8 @@ package body Synth.Expr is
for I in 0 .. Val.Typ.W - 1 loop
declare
B : constant Uns32 :=
- Uns32 (Shift_Right (To_Uns64 (Val.Scal), Natural (I)))
- and 1;
+ Uns32 (Shift_Right (To_Uns64 (Val.Scal), Natural (I))
+ and 1);
Idx : constant Digit_Index := Digit_Index (Off / 32);
Pos : constant Natural := Natural (Off mod 32);
begin