Merge pull request #8 from VEAF/davidp57/issue1

VEAF MCT - error when adding AI planes to the mission
This commit is contained in:
Ambroise Garel 2025-08-03 19:22:51 +02:00 committed by GitHub
commit 6b765e7c80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -229,7 +229,7 @@ do
for _,g in ipairs(missionGroups) do
if g.units and g.units[1] then
local unit = g.units[1]
if unit.callsign and unit.callsign[1] and unit.callsign.name then
if unit.callsign and type(unit.callsign) == "table" and unit.callsign.name then
local callsignName = unit.callsign.name:sub(1, #unit.callsign.name - 2)
incrementCallsign(callsignName, unit.callsign[2])
end