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
1 changed files with 1 additions and 1 deletions

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)