Quantcast

In addon:TooltipScanRecipe(): Call strlower() on the initial text, since the strmatch() may return nil.

torhal [06-11-09 - 18:31]
In addon:TooltipScanRecipe(): Call strlower() on the initial text, since the strmatch() may return nil.
Filename
ARLDatamine.lua
diff --git a/ARLDatamine.lua b/ARLDatamine.lua
index 274d230..0d1e780 100644
--- a/ARLDatamine.lua
+++ b/ARLDatamine.lua
@@ -1982,8 +1982,8 @@ function addon:TooltipScanRecipe(spellid)
 			ARLDatamineTT:SetHyperlink(recipe_link)	-- Load the tooltip

 			-- Lets check to see if it's a recipe tooltip
-			local text = _G["ARLDatamineTTTextLeft1"]:GetText()
-			local matchtext = strlower(strmatch(text, "%a+: "))
+			local text = strlower(_G["ARLDatamineTTTextLeft1"]:GetText())
+			local matchtext = strmatch(text, "%a+: ")

 			-- Check to see if we're dealing with a recipe
 			if (RECIPE_NAMES[matchtext]) then