Skip to content

Commit

Permalink
ACCESS: Fix crash in conversation screen when clicking outside respon…
Browse files Browse the repository at this point in the history
…se boxes
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent c4a5c36 commit 2daa96e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engines/access/events.cpp
Expand Up @@ -254,14 +254,16 @@ Common::Point EventsManager::calcRawMouse() {

int EventsManager::checkMouseBox1(Common::Array<Common::Rect> &rects) {
int i = 0;
for (i = 0;; i++) {
for (i = 0; i < rects.size(); ++i) {
if (rects[i].left == -1)
return -1;

if ((_mousePos.x > rects[i].left) && (_mousePos.x < rects[i].right)
&& (_mousePos.y > rects[i].top) && (_mousePos.y < rects[i].bottom))
return i;
}

return -1;
}

bool EventsManager::isKeyMousePressed() {
Expand Down

0 comments on commit 2daa96e

Please sign in to comment.