From e046171c882d90e84ce3e8c0eb0b4294abbbfb1a Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sun, 29 Nov 2015 12:07:45 +0100 Subject: [PATCH] Fix leaked global variables --- BagSync.lua | 4 ++-- BagSync_Search.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BagSync.lua b/BagSync.lua index 35deb60..881f3f6 100644 --- a/BagSync.lua +++ b/BagSync.lua @@ -331,7 +331,7 @@ local function ScanVoidBank() for tab = 1, numTabs do for i = 1, 80 do - itemID, textureName, locked, recentDeposit, isFiltered = GetVoidItemInfo(tab, i) + local itemID, textureName, locked, recentDeposit, isFiltered = GetVoidItemInfo(tab, i) if (itemID) then index = index + 1 slotItems[index] = itemID and tostring(itemID) or nil @@ -846,7 +846,7 @@ local function AddItemToTooltip(frame, link) --workaround end end end - _, link = GetItemInfo(newItemId) -- replace original link with our found link + link = select(2, GetItemInfo(newItemId)) -- replace original link with our found link end end diff --git a/BagSync_Search.lua b/BagSync_Search.lua index cc94e37..b98fb56 100644 --- a/BagSync_Search.lua +++ b/BagSync_Search.lua @@ -42,7 +42,7 @@ ItemSearch:RegisterTypedSearch{ for i = 1, tooltipScanner:NumLines() do local text = _G[tooltipScanner:GetName() .. 'TextLeft' .. i]:GetText():lower() - textChk = string.find(text, pattern) + local textChk = string.find(text, pattern) if textChk and tostring(text):find(search) then result = true -- 1.7.9.5