Quantcast

-small temporary fix to get rid of the errors associated with capturing and using pets.

Xruptor [09-25-12 - 22:49]
-small temporary fix to get rid of the errors associated with capturing and using pets.
-I'll fix this as soon as I actually you know.. start playing MOP LOL.
Filename
BagSync.lua
BagSync.toc
diff --git a/BagSync.lua b/BagSync.lua
index 3c48b79..5a50b9c 100644
--- a/BagSync.lua
+++ b/BagSync.lua
@@ -254,10 +254,14 @@ local function ToShortLink(link)
 	if link and type(link) == "string" then
 		--first attempt
 		local _, first = string.find(link, "item:")
-		local second = string.find(link, ":", first+1) --first occurance of : after item:
-		local finally = string.sub(link, first+1, second-1) --after item:  and before second :
-		if tonumber(finally) then
-			return finally
+		if first then
+			local second = string.find(link, ":", first+1) --first occurance of : after item:
+			if second then
+				local finally = string.sub(link, first+1, second-1) --after item:  and before second :
+				if tonumber(finally) then
+					return finally
+				end
+			end
 		end
 		--second attempt
 		local a,b,c,d,e,f,g,h = link:match('(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+)')
diff --git a/BagSync.toc b/BagSync.toc
index 1f048fb..2d14c69 100644
--- a/BagSync.toc
+++ b/BagSync.toc
@@ -2,7 +2,7 @@
 ## Title: BagSync
 ## Notes: BagSync tracks your characters items and displays it within tooltips.
 ## Author: Xruptor
-## Version: 6.7.4
+## Version: 6.7.5
 ## SavedVariables: BagSyncDB, BagSyncOpt, BagSyncGUILD_DB, BagSyncTOKEN_DB, BagSyncCRAFT_DB, BagSyncBLACKLIST_DB

 localization\localization.lua