On Android, char is interpreted as unsigned by default.
When decoding "int 8" format on Android, the following type conversion produces incorrect result:
lua_pushnumber(L,(char)c->p[1]); // (e.g. -39 -> 217)
Changing (char) to (signed char) fixes this on Android and other platforms that treat char as unsigned by default.
On Android, char is interpreted as unsigned by default.
When decoding "int 8" format on Android, the following type conversion produces incorrect result: lua_pushnumber(L,(char)c->p[1]); // (e.g. -39 -> 217)
Changing (char) to (signed char) fixes this on Android and other platforms that treat char as unsigned by default.