Skip to content

Commit

Permalink
fix: Crash when scrolling to the end of a file that is multiples of 8…
Browse files Browse the repository at this point in the history
… bytes long
  • Loading branch information
WerWolv committed Oct 22, 2022
1 parent f53d7fc commit 2c167d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/builtin/source/content/views/view_hex_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2c167d6

Please sign in to comment.