diff options
Diffstat (limited to 'src/synth')
-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 80f76a1c4..b44024367 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -487,9 +487,9 @@ package body Synth.Expr is case Rng.Dir is when Iir_To => - return Bit_Extract (Pfx, Uns32 (Idx - Rng.Left)); + return Bit_Extract (Pfx, Uns32 (Rng.Right - Idx)); when Iir_Downto => - return Bit_Extract (Pfx, Uns32 (Rng.Left - Idx)); + return Bit_Extract (Pfx, Uns32 (Idx - Rng.Right)); end case; end Synth_Indexed_Name; |