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
This commit is contained in:
stephena 2012-01-05 21:30:35 +00:00
parent b10720321a
commit fcf3aed924
1 changed files with 2 additions and 2 deletions

View File

@ -124,8 +124,8 @@ void TiaZoomWidget::recalc()
// Only redraw when necessary // Only redraw when necessary
int oldXoff = myXoff, oldYoff = myYoff; int oldXoff = myXoff, oldYoff = myYoff;
myXoff = myXCenter - (myNumCols >> 1); myXoff = BSPF_max(0, myXCenter - (myNumCols >> 1));
myYoff = myYCenter - (myNumRows >> 1); myYoff = BSPF_max(0, myYCenter - (myNumRows >> 1));
if(oldXoff != myXoff || oldYoff != myYoff) if(oldXoff != myXoff || oldYoff != myYoff)
{ {
setDirty(); draw(); setDirty(); draw();