ports/astro/celestia/files/celestia-lua-52-fix.patch
Alexey Dokuchaev f8f7ecd590 Pull another patch from Red Hat, to fix a runtime crash:
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
2014-12-14 13:23:35 +00:00

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