Skip to content

Commit

Permalink
lua52 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmaclarty committed Nov 29, 2017
1 parent 3343991 commit ae6b110
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion third_party/lua-5.2.4/src/llex.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ static void buffreplace (LexState *ls, char from, char to) {
*/
static void trydecpoint (LexState *ls, SemInfo *seminfo) {
char old = ls->decpoint;
ls->decpoint = getlocaledecpoint();
/* AMULET change for android which does not support decimal_point
*
* ls->decpoint = getlocaledecpoint();
*/
ls->decpoint = '.';
buffreplace(ls, old, ls->decpoint); /* try new decimal separator */
if (!buff2d(ls->buff, &seminfo->r)) {
/* format error with correct decimal point: no more options */
Expand Down
5 changes: 5 additions & 0 deletions third_party/lua-5.2.4/src/loslib.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@


static int os_execute (lua_State *L) {
#ifdef IPHONEOS
lua_pushinteger(L, 1);
return 1;
#else
const char *cmd = luaL_optstring(L, 1, NULL);
int stat = system(cmd);
if (cmd != NULL)
Expand All @@ -86,6 +90,7 @@ static int os_execute (lua_State *L) {
lua_pushboolean(L, stat); /* true if there is a shell */
return 1;
}
#endif
}


Expand Down

0 comments on commit ae6b110

Please sign in to comment.