Merge pull request #555 from argonui/import-instructions

Added nil handling for import instructions
This commit is contained in:
Entrox-Licher 2024-01-21 15:10:38 -05:00 committed by GitHub
commit 107ca76148
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -323,6 +323,7 @@ do
if instructor == "add:" then
slots[str] = (slots[str] or 0) + 1
elseif instructor == "remove:" then
if slots[str] == nil then break end
slots[str] = math.max(slots[str] - 1, 0)
end
end