浏览代码

Boyscouting: Fix backwards ternary operator

Sandy Carter 10 年之前
父节点
当前提交
a14711b3b4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      client/widgets/Buttons.cpp

+ 2 - 2
client/widgets/Buttons.cpp

@@ -209,8 +209,8 @@ void CButton::hover (bool on)
 		setState(PRESSED);*/
 
 	std::string name = hoverTexts[getState()].empty()
-		? hoverTexts[getState()]
-		: hoverTexts[0];
+		? hoverTexts[0]
+		: hoverTexts[getState()];
 
 	if(!name.empty() && !isBlocked()) //if there is no name, there is nohing to display also
 	{