feat: Added new --select, --pattern and --debug-mode subcommands

This commit is contained in:
WerWolv
2025-01-29 18:32:54 +01:00
parent e74e4e92a0
commit aee7a09b6c
7 changed files with 73 additions and 4 deletions

View File

@@ -144,7 +144,7 @@ namespace hex::ui {
if (!m_selectionStart.has_value()) m_selectionStart = start;
if (!m_selectionEnd.has_value()) m_selectionEnd = end;
if (auto bytesPerCell = m_currDataVisualizer->getBytesPerCell(); bytesPerCell > 1) {
if (auto bytesPerCell = m_currDataVisualizer == nullptr ? 1 : m_currDataVisualizer->getBytesPerCell(); bytesPerCell > 1) {
if (end > start) {
start = alignDown(start, bytesPerCell);
end = alignDown(end, bytesPerCell) + (bytesPerCell - 1);