This crashes because REHex::Document::erase_data tries to normalize the cursor pos from -1 (the selection is starting at 0, so the -1 comes from (selection_off - 1).
However to normalize it, the cpos_off is used from before the deletion is done, which is 1 at that point.
This crashes because
REHex::Document::erase_data
tries to normalize the cursor pos from-1
(the selection is starting at 0, so the-1
comes from(selection_off - 1)
. However to normalize it, thecpos_off
is used from before the deletion is done, which is1
at that point.