Fixed wrong Selection range if there's only one byte in selection.

This commit is contained in:
Vladimir Kononovich 2020-10-11 22:07:34 +03:00
parent 9d3d0bccc3
commit 4ea538fbfe

View file

@ -220,6 +220,10 @@ namespace Mesen.GUI.Debugger.Controls
int start = _manager.Provider.GetLineAddress(firstLineOfSelection);
int end = _manager.Provider.GetLineAddress(firstLineAfterSelection) - 1;
if (firstLineOfSelection == firstLineAfterSelection) {
end = start;
}
if(start >= 0 && end >= 0) {
return new SelectedAddressRange() {
Start = new AddressInfo() { Address = start, Type = _manager.RelativeMemoryType },