mirror of
https://git.freebsd.org/ports.git
synced 2025-05-12 23:31:50 -04:00
PANIC: unprotected error in call to Lua API (attempt to index a nil value) PR: 195240 Red Hat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1045632 Patch by: Chris Rankin (Comments 13-16) Obtained from: celestia-1.6.1-15.fc20.src.rpm
16 lines
456 B
Diff
16 lines
456 B
Diff
--- celestia-1.6.1.orig/src/celestia/celx.cpp 2014-02-09 23:23:10.308810741 +0000
|
|
+++ celestia-1.6.1/src/celestia/celx.cpp 2014-02-09 23:24:57.627017784 +0000
|
|
@@ -272,9 +272,13 @@
|
|
const char* name,
|
|
lua_CFunction func)
|
|
{
|
|
+#if LUA_VER >= 0x050200
|
|
+ luaL_requiref(l, name, func, 1);
|
|
+#else
|
|
lua_pushcfunction(l, func);
|
|
lua_pushstring(l, name);
|
|
lua_call(l, 1, 0);
|
|
+#endif
|
|
}
|
|
#endif
|
|
|