From fcf3aed924b5efd0f44455440a7b180f5ee62ed7 Mon Sep 17 00:00:00 2001 From: stephena Date: Thu, 5 Jan 2012 21:30:35 +0000 Subject: [PATCH] Fixed crash in TIA zoom in the debugger, thanks to report from SvOlli of AtariAge. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2335 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/debugger/gui/TiaZoomWidget.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debugger/gui/TiaZoomWidget.cxx b/src/debugger/gui/TiaZoomWidget.cxx index 533a2d8aa..39fb16028 100644 --- a/src/debugger/gui/TiaZoomWidget.cxx +++ b/src/debugger/gui/TiaZoomWidget.cxx @@ -124,8 +124,8 @@ void TiaZoomWidget::recalc() // Only redraw when necessary int oldXoff = myXoff, oldYoff = myYoff; - myXoff = myXCenter - (myNumCols >> 1); - myYoff = myYCenter - (myNumRows >> 1); + myXoff = BSPF_max(0, myXCenter - (myNumCols >> 1)); + myYoff = BSPF_max(0, myYCenter - (myNumRows >> 1)); if(oldXoff != myXoff || oldYoff != myYoff) { setDirty(); draw();