diff --git a/components/lua_ui/widget.cpp b/components/lua_ui/widget.cpp index bd9e47ab34..49d69f8fd1 100644 --- a/components/lua_ui/widget.cpp +++ b/components/lua_ui/widget.cpp @@ -168,7 +168,7 @@ namespace LuaUi int sdlButton = SDLUtil::myGuiMouseButtonToSdl(button); table["position"] = position; table["offset"] = offset; - if (sdlButton == 0) // nil if no button was pressed + if (sdlButton != 0) // nil if no button was pressed table["button"] = sdlButton; return table; }