jakibaki / sys-netcheat

Open-source cheat-engine for the Nintendo Switch.
GNU General Public License v3.0
225 stars 23 forks source link

Lua numbers apparently not large enough for large u64 #9

Closed jakibaki closed 6 years ago

jakibaki commented 6 years ago

:(

jakibaki commented 6 years ago
--- a/source/lua/lua.h
+++ b/source/lua/lua.h
@@ -86,7 +86,7 @@ typedef struct lua_State lua_State;

 /* type of numbers in Lua */
-typedef LUA_NUMBER lua_Number;
+typedef LUA_UNSIGNED lua_Number;

 /* type for integer functions */

This seems to fix it. Though it might break more stuff so I'll need to do some testing with it before it can be used.

jakibaki commented 6 years ago

That is everything but optimal and seems to break even basic things.

jakibaki commented 6 years ago

lua-nums offers an u64 which is pretty much ideal for this purpose. Right now requiring stuff fails without any comment tough (the switch just freezes D:)

jakibaki commented 6 years ago

This will no longer be needed with the move to picoc