From 01f2f20e6cba66c4c83c6c9b41eb14a154097295 Mon Sep 17 00:00:00 2001 From: c0d3d3v Date: Mon, 30 Dec 2024 19:46:32 +0100 Subject: [PATCH] Fix fourBytesToInt but for real -.- --- .../rub/nds/modifiablevariable/util/ArrayConverter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/rub/nds/modifiablevariable/util/ArrayConverter.java b/src/main/java/de/rub/nds/modifiablevariable/util/ArrayConverter.java index ded589a..7077f9b 100644 --- a/src/main/java/de/rub/nds/modifiablevariable/util/ArrayConverter.java +++ b/src/main/java/de/rub/nds/modifiablevariable/util/ArrayConverter.java @@ -78,10 +78,10 @@ public static long eigthBytesToLong(byte[] bytes) { } public static int fourBytesToInt(byte[] bytes) { - return (bytes[4] & 0xFF) << 24 - | (bytes[5] & 0xFF) << 16 - | (bytes[6] & 0xFF) << 8 - | bytes[7] & 0xFF; + return (bytes[0] & 0xFF) << 24 + | (bytes[1] & 0xFF) << 16 + | (bytes[2] & 0xFF) << 8 + | bytes[3] & 0xFF; } /**