From e5b000fad3d13b1f33c5157abe94b96ffcd9227b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 16 Nov 2020 19:05:34 +0100 Subject: synth-objtypes: fix width computation. Fix #1509 --- src/synth/synth-objtypes.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/synth/synth-objtypes.adb b/src/synth/synth-objtypes.adb index 25857f065..4b9e6ea54 100644 --- a/src/synth/synth-objtypes.adb +++ b/src/synth/synth-objtypes.adb @@ -148,7 +148,7 @@ package body Synth.Objtypes is else declare Wl : constant Width := Width (Clog2 (Uns64 (-Lo))); - Wh : constant Width := Width (Clog2 (Uns64 (Hi))); + Wh : constant Width := Width (Clog2 (Uns64 (Hi) + 1)); begin W := Width'Max (Wl, Wh) + 1; end; -- cgit v1.2.3