Skip to content

Commit

Permalink
Fix use of unitialized variables in mouse button handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno- authored and ShadowNinja committed Oct 8, 2014
1 parent 7b548cd commit 914f850
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/guiFormSpecMenu.cpp
Expand Up @@ -2946,11 +2946,14 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)

}

if((event.EventType==EET_MOUSE_INPUT_EVENT &&
event.MouseInput.Event != EMIE_MOUSE_MOVED) ||
(event.MouseInput.Event == EMIE_MOUSE_MOVED &&
event.MouseInput.isRightPressed() && getItemAtPos(m_pointer).i != getItemAtPos(m_old_pointer).i)){
// Mouse event other than movement or crossing the border of inventory field while holding rmb
/* Mouse event other than movement, or crossing the border of inventory
field while holding right mouse button
*/
if (event.EventType == EET_MOUSE_INPUT_EVENT &&
(event.MouseInput.Event != EMIE_MOUSE_MOVED ||
(event.MouseInput.Event == EMIE_MOUSE_MOVED &&
event.MouseInput.isRightPressed() &&
getItemAtPos(m_pointer).i != getItemAtPos(m_old_pointer).i))) {

// Get selected item and hovered/clicked item (s)

Expand Down

0 comments on commit 914f850

Please sign in to comment.