Skip to content

Conversation

@XmiliaH
Copy link
Contributor

@XmiliaH XmiliaH commented Nov 23, 2025

The VM discarded arguments and returns with nil values in some cases such as the following script

local function multiret()
    return 1, nil, 2, nil, nil, 5, nil, nil
end

local function r(...)
    return ...
end

local function t(...)
    return r(...)
end

print(r(t(multiret())))

This was mostly caused by the usage of table.insert which discards nil values and the pattern unpack({...}) which uses # for the length of the table which also discards nil values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant