diff options
author | Paul Gilbert | 2014-03-23 22:40:37 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-03-23 22:40:37 -0400 |
commit | 0b1c15e6dcd2f16d5ef67e61fd4c8c0157f66706 (patch) | |
tree | 415b6230ceda072445f0df626d39e3d014f70786 | |
parent | 0dfa60ae00428ad83c6b6d19963e2d7352707637 (diff) | |
download | scummvm-rg350-0b1c15e6dcd2f16d5ef67e61fd4c8c0157f66706.tar.gz scummvm-rg350-0b1c15e6dcd2f16d5ef67e61fd4c8c0157f66706.tar.bz2 scummvm-rg350-0b1c15e6dcd2f16d5ef67e61fd4c8c0157f66706.zip |
MADS: Fix setting category/desc Id from highlighted screen elements
-rw-r--r-- | engines/mads/screen.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp index 964e83630c..5b0d4422ce 100644 --- a/engines/mads/screen.cpp +++ b/engines/mads/screen.cpp @@ -293,8 +293,9 @@ void ScreenObjects::check(bool scanFlag) { _category = CAT_NONE; _selectedObject = scanBackwards(_vm->_events->currentPos(), LAYER_GUI); if (_selectedObject > 0) { - _category = (ScrCategory)((*this)[_selectedObject - 1]._category & 7); - _newDescId = (*this)[_selectedObject - 1]._descId; + ScreenObject &scrObject = (*this)[_selectedObject]; + _category = (ScrCategory)(scrObject._category & 7); + _newDescId = scrObject._descId; } // Handling for easy mouse |