From 9ab431977195207f2b530148562412d972a6d55c Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 19 Nov 2021 10:20:30 +0100 Subject: [PATCH] *this is wrong intensifies* --- .../src/main/java/com/viaversion/viaversion/util/MathUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/com/viaversion/viaversion/util/MathUtil.java b/common/src/main/java/com/viaversion/viaversion/util/MathUtil.java index a978c945e..06ba802c4 100644 --- a/common/src/main/java/com/viaversion/viaversion/util/MathUtil.java +++ b/common/src/main/java/com/viaversion/viaversion/util/MathUtil.java @@ -26,6 +26,6 @@ public final class MathUtil { * @return ceiled log2 of the given number */ public static int ceilLog2(final int i) { - return i > 0 ? 31 - Integer.numberOfLeadingZeros(i) : 0; + return i > 0 ? 32 - Integer.numberOfLeadingZeros(i - 1) : 0; } }