From 035c7a4a70025565e92e1aa338fde9eb25f725e1 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Wed, 21 Dec 2022 14:56:53 +0100 Subject: [PATCH] Fixed parser again... --- src/itemscript.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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