View Single Post
07/06/14, 06:47 PM   #21
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by YelloDello View Post
Ah so that's what changed. Thanks.

Btw, I've noticed that if you call ZO_LinkHandler_ParseLink "too often" in a single execution, it seems to cause a crash to desktop. I'm not sure what the threshold is. The 1.1 version of ZO_LinkHandler_ParseLink did not cause the crash, even when I called it more than I do now. The new parselink must be more taxing with its string matching and splitting.
ZO_LinkHandler_ParseLink before patch:
Lua Code:
  1. function ZO_LinkHandler_ParseLink(link)
  2.     if type(link) == "string" then
  3.         local color, data, text = link:match("|H(.-):(.-)|h(.-)|h")
  4.         return text, color, zo_strsplit(':', data)
  5.     end
  6. end
After patch:
Lua Code:
  1. function ZO_LinkHandler_ParseLink(link)
  2.     if type(link) == "string" then
  3.         local linkStyle, data, text = link:match("|H(.-):(.-)|h(.-)|h")
  4.         return text, linkStyle, zo_strsplit(':', data)
  5.     end
  6. end

Is there such a big difference to cause crash to desktop?
  Reply With Quote