Skip to content
Permalink
Browse files

Fix use of unitialized variables in mouse button handling

  • Loading branch information
Zeno- authored and ShadowNinja committed Oct 8, 2014
1 parent 7b548cd commit 914f850d31009d9f10ca5840c153a61f43508b4d
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/guiFormSpecMenu.cpp
@@ -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)

0 comments on commit 914f850

Please sign in to comment.