From 0048beaa891a91ca9b6e07b7e53003bc1725868f Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Sat, 31 Aug 2019 10:21:30 +0200 Subject: [PATCH] add a quick fix for #532 fix comment for FE detection --- src/debugger/gui/RomListWidget.cxx | 4 ++-- src/emucore/CartDetector.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/debugger/gui/RomListWidget.cxx b/src/debugger/gui/RomListWidget.cxx index aad1b8a0c..d3ab5e5dc 100644 --- a/src/debugger/gui/RomListWidget.cxx +++ b/src/debugger/gui/RomListWidget.cxx @@ -572,7 +572,7 @@ void RomListWidget::drawWidget(bool hilite) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Common::Rect RomListWidget::getLineRect() const { - const int yoffset = (_selectedItem - _currentPos) * _fontHeight, + const int yoffset = std::max(0, (_selectedItem - _currentPos) * _fontHeight), xoffset = CheckboxWidget::boxSize() + 10; return Common::Rect(2 + xoffset, 1 + yoffset, @@ -582,7 +582,7 @@ Common::Rect RomListWidget::getLineRect() const // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Common::Rect RomListWidget::getEditRect() const { - const int yoffset = (_selectedItem - _currentPos) * _fontHeight; + const int yoffset = std::max(0, (_selectedItem - _currentPos) * _fontHeight); return Common::Rect(2 + _w - _bytesWidth, 1 + yoffset, _w, _fontHeight + yoffset); diff --git a/src/emucore/CartDetector.cxx b/src/emucore/CartDetector.cxx index 6e32431da..81ca1a1c9 100644 --- a/src/emucore/CartDetector.cxx +++ b/src/emucore/CartDetector.cxx @@ -932,7 +932,7 @@ bool CartDetector::isProbablyFE(const ByteBuffer& image, uInt32 size) { 0x20, 0x00, 0xD0, 0xC6, 0xC5 }, // JSR $D000; DEC $C5 { 0x20, 0xC3, 0xF8, 0xA5, 0x82 }, // JSR $F8C3; LDA $82 { 0xD0, 0xFB, 0x20, 0x73, 0xFE }, // BNE $FB; JSR $FE73 - { 0x20, 0x00, 0xF0, 0x84, 0xD6 } // JSR $F000; STY $D6 + { 0x20, 0x00, 0xF0, 0x84, 0xD6 } // JSR $F000; $84, $D6 }; for(uInt32 i = 0; i < 4; ++i) if(searchForBytes(image.get(), size, signature[i], 5, 1))