Fixed: Concatenation fail when user sets the timer settings to an empty value

This commit is contained in:
Deyan Dobromirov 2019-07-15 21:32:31 +03:00 committed by dvdvideo1234
parent c612f29f80
commit c194d3e4e9
2 changed files with 3 additions and 4 deletions

View File

@ -52,7 +52,7 @@ local gtInitLogs = {"*Init", false, 0}
------ CONFIGURE ASMLIB ------
asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","6.548")
asmlib.SetOpVar("TOOL_VERSION","6.549")
asmlib.SetIndexes("V" , "x", "y", "z")
asmlib.SetIndexes("A" ,"pitch","yaw","roll")
asmlib.SetIndexes("WV",1,2,3)
@ -110,7 +110,7 @@ cvarsAddChangeCallback(gsTimerMD, function(sVar, vOld, vNew)
local mkTab, ID = asmlib.GetBuilderID(1), 1
while(mkTab) do local sTim = arTim[ID]
local defTab = mkTab:GetDefinition(); mkTab:TimerSetup(sTim)
asmlib.LogInstance("Timer apply {"..defTab.Nick.."}<"..sTim..">",gtInitLogs)
asmlib.LogInstance("Timer apply {"..defTab.Nick.."}<"..tostring(sTim)..">",gtInitLogs)
ID = ID + 1; mkTab = asmlib.GetBuilderID(ID) -- Next table on the list
end; asmlib.LogInstance("Timer update <"..tostring(vNew)..">",gtInitLogs)
end, gsTimerMD.."_call")

View File

@ -1942,8 +1942,7 @@ function CreateTable(sTable,defTab,bDelete,bReload)
end
-- Generates a timer settings table and keeps the defaults
function self:TimerSetup(vTim)
local qtCmd = self:GetCommand()
local qtDef = self:GetDefinition()
local qtCmd, qtDef = self:GetCommand(), self:GetDefinition()
local sTm = tostring((vTim and vTim or qtDef.Timer) or "")
local tTm = GetOpVar("OPSYM_REVISION"):Explode(sTm)
tTm[1] = tostring(tTm[1] or "CQT") -- Timer mode