mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
Strip leading 'v' from version tags before parsing
Release tags often include a leading 'v' (e.g. "v9.0.18"). Previously the code split the raw tag directly which could yield a nil major version and fall back to 0.
This commit is contained in:
@@ -425,7 +425,7 @@ pfUI:SetScript("OnEvent", function()
|
||||
pfUI.version.major, pfUI.version.minor, pfUI.version.fix = 0, 0, 0
|
||||
pfUI.version.string = "dev"
|
||||
else
|
||||
local major, minor, fix = pfUI.api.strsplit(".", raw)
|
||||
local major, minor, fix = pfUI.api.strsplit(".", string.gsub(raw, "^[vV]", ""))
|
||||
pfUI.version.major = tonumber(major) or 0
|
||||
pfUI.version.minor = tonumber(minor) or 0
|
||||
pfUI.version.fix = tonumber(fix) or 0
|
||||
|
||||
Reference in New Issue
Block a user