diff options
Diffstat (limited to 'src/synth/netlists-expands.adb')
-rw-r--r-- | src/synth/netlists-expands.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/synth/netlists-expands.adb b/src/synth/netlists-expands.adb index ebc51670d..3438ee132 100644 --- a/src/synth/netlists-expands.adb +++ b/src/synth/netlists-expands.adb @@ -52,7 +52,7 @@ package body Netlists.Expands is Max := Get_Param_Uns32 (Inst1, 1); pragma Assert (Max /= 0); - Res := Res * Natural (Max); + Res := Res * Natural (Max + 1); exit when Inst1 = Inst; end loop; @@ -99,7 +99,7 @@ package body Netlists.Expands is begin pragma Assert (Max /= 0); - for I in 0 .. Max - 1 loop + for I in 0 .. Max loop if Sub_Inst /= No_Instance then -- recurse. raise Internal_Error; |