aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-ieee-numeric_std.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/synth-ieee-numeric_std.adb')
-rw-r--r--src/synth/synth-ieee-numeric_std.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/synth/synth-ieee-numeric_std.adb b/src/synth/synth-ieee-numeric_std.adb
index 2c0951f3b..4c7080f5a 100644
--- a/src/synth/synth-ieee-numeric_std.adb
+++ b/src/synth/synth-ieee-numeric_std.adb
@@ -873,11 +873,11 @@ package body Synth.Ieee.Numeric_Std is
for I in 1 .. Size loop
if I <= Old_Size then
- B := Read_Std_Logic (Val.Mem, I - 1);
+ B := Read_Std_Logic (Val.Mem, Old_Size - I);
else
B := Pad;
end if;
- Write_Std_Logic (Res.Mem, I - 1, B);
+ Write_Std_Logic (Res.Mem, Size - I, B);
end loop;
return Res;