From 5bb27c000ce473be019cfd810c3a07a705a9c40a Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 20 Jul 2023 23:16:15 +0200 Subject: [PATCH] bugfix for unprovided subtype --- src/core/token/TokenManager.ttslua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/token/TokenManager.ttslua b/src/core/token/TokenManager.ttslua index 0b1b12ec..235e8c58 100644 --- a/src/core/token/TokenManager.ttslua +++ b/src/core/token/TokenManager.ttslua @@ -232,6 +232,11 @@ do return end + -- handling for not provided subtype (for example when spawning from custom data helpers) + if subType == nil then + subType = "" + end + -- this is used to load the correct state for additional resource tokens (e.g. "Ammo") local callback = nil local stateID = stateTable[string.lower(subType)]