X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=469239d18b48fc4b779cc9f0f9823d94718ed1e4;hb=307b13d025b6b0a5011c74efa3a2c023d3986ebb;hp=9f679ac4e2125778244d5c6fa9d30c8d4afb4ec2;hpb=983d4e27852f9c81935bf4ae36482f6084264e15;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 9f679ac4..469239d1 100644 --- a/src/screens.c +++ b/src/screens.c @@ -3271,8 +3271,8 @@ static void clearMenuListArea() int scrollbar_xpos = mSX + SC_SCROLLBAR_XPOS + menu.scrollbar_xoffset; /* correct scrollbar position if placed outside menu (playfield) area */ - if (scrollbar_xpos > SC_SCROLLBAR_XPOS) - scrollbar_xpos = SC_SCROLLBAR_XPOS; + if (scrollbar_xpos > mSX + SC_SCROLLBAR_XPOS) + scrollbar_xpos = mSX + SC_SCROLLBAR_XPOS; /* clear menu list area, but not title or scrollbar */ DrawBackground(mSX, mSY + MENU_SCREEN_START_YPOS * 32,