Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua 5.3: Attempt to call a nil value (global 'unpack') #3

Closed
redcatbear opened this issue Aug 24, 2020 · 0 comments · Fixed by #4
Closed

Lua 5.3: Attempt to call a nil value (global 'unpack') #3

redcatbear opened this issue Aug 24, 2020 · 0 comments · Fixed by #4
Assignees
Labels

Comments

@redcatbear
Copy link
Collaborator

Situation

When trying to use mockagne with Lua 5.3, the following error is thrown.

mockagne.lua:145: attempt to call a nil value (global 'unpack')

Looking at the code unpack() is used a handful of times as global reference. In Lua 5.3 the unpack function was moved into table.

Steps to reproduce

  • Run existing tests on Lua 5.3

Proposed fix

Add the following for a backward-compatible fix:

local unpack = table.unpack or unpack
@redcatbear redcatbear added the bug label Sep 2, 2020
@redcatbear redcatbear self-assigned this Sep 2, 2020
@redcatbear redcatbear added this to the M1: Lua 5.3 compatibility milestone Sep 2, 2020
redcatbear added a commit that referenced this issue Sep 2, 2020
@vertti vertti closed this as completed in #4 Sep 3, 2020
vertti added a commit that referenced this issue Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant