From 86bfdbea13596717b82da13dddd26afa0fcf97d2 Mon Sep 17 00:00:00 2001 From: jakobrs Date: Sun, 8 Aug 2021 19:57:45 +0200 Subject: [PATCH] Fix not-equals verb having the wrong number of arguments in Lua API --- modules/module-lua-scripting/api.c | 1 + modules/module-lua-scripting/api.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/module-lua-scripting/api.c b/modules/module-lua-scripting/api.c index f35785d8..bad41b19 100644 --- a/modules/module-lua-scripting/api.c +++ b/modules/module-lua-scripting/api.c @@ -511,6 +511,7 @@ object_interest_new_add_constraint (lua_State *L, GType type, switch (verb) { case WP_CONSTRAINT_VERB_EQUALS: + case WP_CONSTRAINT_VERB_NOT_EQUALS: case WP_CONSTRAINT_VERB_MATCHES: { lua_geti (L, constraint_idx, 3); value = constraint_value_to_variant (L, -1); diff --git a/modules/module-lua-scripting/api.lua b/modules/module-lua-scripting/api.lua index 6400402a..cbab5573 100644 --- a/modules/module-lua-scripting/api.lua +++ b/modules/module-lua-scripting/api.lua @@ -53,7 +53,7 @@ local function Constraint (spec) end -- check if we got the right amount of values - if verb == "=" or verb == "#" then + if verb == "=" or verb == "!" or verb == "#" then assert (spec[3] ~= nil, "Constraint: " .. verbs[verb] .. ": expected constraint value") elseif verb == "c" then