(svn r19250) -Fix [FS#3643]: with RTL languages clicking a horizontal scrollbar that could not scroll could cause a crash

This commit is contained in:
rubidium 2010-02-25 14:53:22 +00:00
parent 1ad5e1cece
commit 14d28c5e69
1 changed files with 1 additions and 1 deletions

View File

@ -1757,7 +1757,7 @@ static bool HandleScrollbarScrolling()
/* Find the item we want to move to and make sure it's inside bounds. */
int pos = min(max(0, i + _scrollbar_start_pos) * sb->GetCount() / _scrollbar_size, max(0, sb->GetCount() - sb->GetCapacity()));
if (rtl) pos = sb->GetCount() - sb->GetCapacity() - pos;
if (rtl) pos = max(0, sb->GetCount() - sb->GetCapacity() - pos);
if (pos != sb->GetPosition()) {
sb->SetPosition(pos);
w->SetDirty();