diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-01-12 21:33:30 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-01-12 21:33:30 +0100 |
commit | 7b60fc68cf36f3fb1861f525bfabc78e4f99a036 (patch) | |
tree | 118003eaeec7c1cacfc4bca0d01e26be742f517d /src | |
parent | 9551aa636be9f2ca830eec5e5192756de335319a (diff) | |
download | ghdl-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.adb | 4 |
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 |