summaryrefslogtreecommitdiff
path: root/src/lua/src/llex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/src/llex.c')
-rw-r--r--src/lua/src/llex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua/src/llex.c b/src/lua/src/llex.c
index 6dc319358..98068c1aa 100644
--- a/src/lua/src/llex.c
+++ b/src/lua/src/llex.c
@@ -176,9 +176,15 @@ static void buffreplace (LexState *ls, char from, char to) {
static void trydecpoint (LexState *ls, SemInfo *seminfo) {
/* format error: try to update decimal point separator */
+#ifndef __ANDROID__
struct lconv *cv = localeconv();
+#endif
char old = ls->decpoint;
+#ifndef __ANDROID__
ls->decpoint = (cv ? cv->decimal_point[0] : '.');
+#else
+ ls->decpoint = '.';
+#endif
buffreplace(ls, old, ls->decpoint); /* try updated decimal separator */
if (!luaO_str2d(luaZ_buffer(ls->buff), &seminfo->r)) {
/* format error with correct decimal point: no more options */