From c80f420d3967b1ddea9348a256f814ca3503fdd7 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Tue, 25 Sep 2012 18:49:59 -0400 Subject: [PATCH] -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. --- BagSync.lua | 12 ++++++++---- BagSync.toc | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) 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 -- 1.7.9.5