diff --git a/src/itemscript.lua b/src/itemscript.lua index 305e9ac..0927cd3 100644 --- a/src/itemscript.lua +++ b/src/itemscript.lua @@ -66,9 +66,10 @@ local function parseItemFilterExpression(expr) local negated = false if prefixIdx ~= nil then for i = prefixIdx, prefixIdxEnd do - if expr[i] == "!" then + local char = string.sub(expr, i, i) + if char == "!" then negated = true - elseif expr[i] == "#" then + elseif char == "#" then fuzzy = true end end