Correction of the compilation inside android

This commit is contained in:
Edouard Dupin 2012-06-19 16:53:17 +02:00
parent e97e33890b
commit 4cc605a701

View File

@ -210,6 +210,7 @@ static void buffreplace (LexState *ls, char from, char to) {
** the one defined in the current locale and check again
*/
static void trydecpoint (LexState *ls, SemInfo *seminfo) {
#ifndef __PLATFORM__Android
char old = ls->decpoint;
ls->decpoint = getlocaledecpoint();
buffreplace(ls, old, ls->decpoint); /* try new decimal separator */
@ -218,6 +219,11 @@ static void trydecpoint (LexState *ls, SemInfo *seminfo) {
buffreplace(ls, ls->decpoint, '.'); /* undo change (for error message) */
lexerror(ls, "malformed number", TK_NUMBER);
}
#else
/* format error with correct decimal point: no more options */
buffreplace(ls, ls->decpoint, '.'); /* undo change (for error message) */
lexerror(ls, "malformed number", TK_NUMBER);
#endif
}