From 45c03c9fc2c50482f341648bac87f425c9f3d9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 26 Jul 2025 19:39:10 +0200 Subject: [PATCH] Fixed: The hex view does not display bytes if there are too few of them --- CHANGELOG.md | 1 + .../decompiler/flash/gui/hexview/HexViewTableModel.java | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0963b43e5..64ac90036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ All notable changes to this project will be documented in this file. - AS direct editation/highlighter §§pop and §§dup can have getmember or call - [#1295], [#116] AS3 dynamic construction via MultinameL - ABC cleaner not properly fixing namespace sets +- The hex view does not display bytes if there are too few of them ### Changed - Icon of "Deobfuscation options" menu from pile of pills to medkit diff --git a/src/com/jpexs/decompiler/flash/gui/hexview/HexViewTableModel.java b/src/com/jpexs/decompiler/flash/gui/hexview/HexViewTableModel.java index d25050d77..674485b47 100644 --- a/src/com/jpexs/decompiler/flash/gui/hexview/HexViewTableModel.java +++ b/src/com/jpexs/decompiler/flash/gui/hexview/HexViewTableModel.java @@ -37,10 +37,7 @@ public class HexViewTableModel extends AbstractTableModel { return 0; } int byteCount = data.length; - int rowCount = byteCount / bytesInRow; - if (byteCount % bytesInRow != 0) { - rowCount++; - } + int rowCount = (int) Math.ceil(byteCount / (double) bytesInRow); return rowCount; }