From 4ff29f33b0d86888a02524df5d6085c4bc29477e Mon Sep 17 00:00:00 2001 From: torque Date: Fri, 6 Mar 2015 03:20:57 -0800 Subject: Lua: add unpack shim for Lua 5.2/5.3 compatibility. The global unpack function got moved to table.unpack in Lua 5.2, and it's only available as the global if 5.2 is built with compatibility enabled (the default). Lua 5.3 does not build with 5.1 compatibility by default. Fixes #1648. --- player/lua/defaults.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'player/lua/defaults.lua') diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index 4cdeef497f..3a55e3a206 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -1,3 +1,5 @@ +-- Compatibility shim for lua 5.2/5.3 +unpack = unpack or table.unpack -- these are used internally by lua.c mp.UNKNOWN_TYPE.info = "this value is inserted if the C type is not supported" -- cgit v1.2.3