Add the old bit32 LUA module as a compatiblity shim.
Many exisiting LUA scripts are using bit32 which has been removed in LUA5.4 in favor of native language support of bitwise operations. Yet, it's easier to backport this module rather than patching all the existing LUA scripts because most of them can't be tested.
This commit is contained in:
1 parent
22658097a7
commit
0c116f5517
5 files changed
+238
-2
No files matched your search
@@ -22,6 +22,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "lauxlib.h"
|
||||
#include "lua_bitlib.h"
|
||||
#include "cmdmain.h"
|
||||
#include "proxmark3.h"
|
||||
#include "comms.h"
|
||||
@@ -1437,6 +1438,9 @@ int set_pm3_libraries(lua_State *L) {
|
||||
|
||||
lua_pushglobaltable(L);
|
||||
|
||||
// bit32 compatibility shim
|
||||
register_bit32_lib(L);
|
||||
|
||||
// Core module
|
||||
luaL_newlib(L, libs);
|
||||
lua_setfield(L, -2, "core");
|
||||
|
||||
Reference in new issue
Block a user