Mercurial > mplayer.hg
comparison gui/mplayer/pb.c @ 33107:eda3df3e4a9d
Prevent an out-of-bounds array access.
This out-of-bounds array access was of not much effect until r33190, because
the variables falsely changed (set to 1) were either almost always unused
(the last member of the mainItems array) or variable menuIsPresent which only
has effect if there is a menu present (in which case it is set anyway).
With r33190 the wItem (and thus the guiItems) structure size changed and now
variables were accessed whose changings have visible effect. After releasing
the moved main (or playbar) window, the IndexOfItems values got destroyed and
items disappeared.
author | ib |
---|---|
date | Sun, 03 Apr 2011 14:24:36 +0000 |
parents | 21e0de9c355f |
children | 5450a92ac4bd |
comparison
equal
deleted
inserted
replaced
33106:e9e5ee3a1a82 | 33107:eda3df3e4a9d |
---|---|
159 break; | 159 break; |
160 } | 160 } |
161 | 161 |
162 break; | 162 break; |
163 case wsRLMouseButton: | 163 case wsRLMouseButton: |
164 if ( SelectedItem != -1 ) // NOTE TO MYSELF: only if itButton, itHPotmeter or itVPotmeter | |
165 { | |
164 item=&appMPlayer.barItems[SelectedItem]; | 166 item=&appMPlayer.barItems[SelectedItem]; |
165 item->pressed=btnReleased; | 167 item->pressed=btnReleased; |
168 } | |
166 SelectedItem=-1; | 169 SelectedItem=-1; |
167 if ( currentselected == - 1 ) { itemtype=0; break; } | 170 if ( currentselected == - 1 ) { itemtype=0; break; } |
168 value=0; | 171 value=0; |
169 | 172 |
170 switch( itemtype ) | 173 switch( itemtype ) |