1
0
mirror of synced 2024-11-25 00:00:27 +01:00

fix: Crash when scrolling to the end of a file that is multiples of 8 bytes long

This commit is contained in:
WerWolv 2022-10-22 15:46:03 +02:00
parent f53d7fc9f3
commit 2c167d6d27

View File

@ -938,7 +938,7 @@ namespace hex::plugin::builtin {
auto [foregroundColor, backgroundColor] = cellColors[x];
if (isColumnSeparatorColumn(x + 1, columnCount)) {
if (isColumnSeparatorColumn(x + 1, columnCount) && cellColors.size() > x + 1) {
auto separatorAddress = x + y * columnCount;
auto [nextForegroundColor, nextBackgroundColor] = cellColors[x + 1];
if ((isSelectionValid() && getSelection().overlaps({ separatorAddress, 1 }) && getSelection().getEndAddress() != separatorAddress) || backgroundColor == nextBackgroundColor)