ZeroAuctions

24 - GetSafeLink() could be better

I've had problems with the scanners picking up extra digits in the item id's.  Here's the version I use:

function addon:GetSafeLink(link)
        if not link then return end
        local s, e = string.find(link, "|H(.-):([-0-9]+)")
        return string.sub(link, s+2, e)
end

Without this change I'll see things like:
                                ["item:52175:0"] = true,
which should be:
                                ["item:52175"] = true,

This was particularly bad a while ago on the Mac wow client that had problems with uninitialized memory and would put random garbage in these fields.

User When Change
Zerotorescue Mar 01, 2011 at 10:37 UTC Changed status from New to Waiting
peterwemm Mar 01, 2011 at 01:35 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of Zerotorescue Zerotorescue Mar 01, 2011 at 10:37 UTC - 0 likes

    I'm assuming you are right without verifying the original function but please understand this change would require me to update existing databases to match the new GetSafeLink result.

    Ticket noted, I'll look further into it at a later time to find out the effects of this.

  • 1 comment

Facts

Last updated
Mar 01, 2011
Reported
Mar 01, 2011
Status
Waiting - Waiting for more information.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees