diff options
author | Paul Gilbert | 2016-12-02 19:54:49 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-12-02 19:54:49 -0500 |
commit | 9913c91d3a827c10e86d0ebf2fde9ea53541f9c6 (patch) | |
tree | 313d2ae6d61954707814954090e37c894391847d /engines/titanic/pet_control | |
parent | 033d8e008e632f2880b6f52c643c33f389a0aa5f (diff) | |
download | scummvm-rg350-9913c91d3a827c10e86d0ebf2fde9ea53541f9c6.tar.gz scummvm-rg350-9913c91d3a827c10e86d0ebf2fde9ea53541f9c6.tar.bz2 scummvm-rg350-9913c91d3a827c10e86d0ebf2fde9ea53541f9c6.zip |
TITANIC: Fix changing inventory glyphs positions when dragging one
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r-- | engines/titanic/pet_control/pet_glyphs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/titanic/pet_control/pet_glyphs.cpp b/engines/titanic/pet_control/pet_glyphs.cpp index 5cc428b104..ed043811ce 100644 --- a/engines/titanic/pet_control/pet_glyphs.cpp +++ b/engines/titanic/pet_control/pet_glyphs.cpp @@ -558,8 +558,8 @@ void CPetGlyphs::removeInvalid() { } } - _firstVisibleIndex = CLIP(_firstVisibleIndex, 0, - (int)size() - _numVisibleGlyphs); + int max = MAX((int)size() - _numVisibleGlyphs, 0); + _firstVisibleIndex = CLIP(_firstVisibleIndex, 0, max); } } |