From e6c5018eb0f0370e3fecf3efb0210dd3275ae97c Mon Sep 17 00:00:00 2001 From: Toni Helenius Date: Sat, 15 Jun 2024 11:58:25 +0300 Subject: [PATCH] Simplify equations --- .../plugins/java/com/jme3/export/binary/BinaryExporter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/plugins/java/com/jme3/export/binary/BinaryExporter.java b/jme3-core/src/plugins/java/com/jme3/export/binary/BinaryExporter.java index 7575180452..95cb55ab8d 100644 --- a/jme3-core/src/plugins/java/com/jme3/export/binary/BinaryExporter.java +++ b/jme3-core/src/plugins/java/com/jme3/export/binary/BinaryExporter.java @@ -320,8 +320,8 @@ private int findPrevMatch(BinaryIdContentPair oldPair, protected byte[] fixClassAlias(byte[] bytes, int width) { if (bytes.length != width) { byte[] newAlias = new byte[width]; - if (width - (width - bytes.length) >= 0) - System.arraycopy(bytes, width - bytes.length - bytes.length, newAlias, width - bytes.length, width - (width - bytes.length)); + if (bytes.length >= 0) + System.arraycopy(bytes, width - 2 * bytes.length, newAlias, width - bytes.length, bytes.length); return newAlias; } return bytes;