diff options
| -rw-r--r-- | c-api/compat-5.3.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c-api/compat-5.3.c b/c-api/compat-5.3.c index 09c60dd..b82c654 100644 --- a/c-api/compat-5.3.c +++ b/c-api/compat-5.3.c | |||
| @@ -515,7 +515,7 @@ static int compat53_skipBOM (compat53_LoadF *lf) { | |||
| 515 | do { | 515 | do { |
| 516 | c = getc(lf->f); | 516 | c = getc(lf->f); |
| 517 | if (c == EOF || c != *(const unsigned char *)p++) return c; | 517 | if (c == EOF || c != *(const unsigned char *)p++) return c; |
| 518 | lf->buff[lf->n++] = c; /* to be read by the parser */ | 518 | lf->buff[lf->n++] = (char)c; /* to be read by the parser */ |
| 519 | } while (*p != '\0'); | 519 | } while (*p != '\0'); |
| 520 | lf->n = 0; /* prefix matched; discard it */ | 520 | lf->n = 0; /* prefix matched; discard it */ |
| 521 | return getc(lf->f); /* return next character */ | 521 | return getc(lf->f); /* return next character */ |
| @@ -590,7 +590,7 @@ COMPAT53_API int luaL_loadfilex (lua_State *L, const char *filename, const char | |||
| 590 | compat53_skipcomment(&lf, &c); /* re-read initial portion */ | 590 | compat53_skipcomment(&lf, &c); /* re-read initial portion */ |
| 591 | } | 591 | } |
| 592 | if (c != EOF) | 592 | if (c != EOF) |
| 593 | lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */ | 593 | lf.buff[lf.n++] = (char)c; /* 'c' is the first character of the stream */ |
| 594 | status = lua_load(L, &compat53_getF, &lf, lua_tostring(L, -1), mode); | 594 | status = lua_load(L, &compat53_getF, &lf, lua_tostring(L, -1), mode); |
| 595 | readstatus = ferror(lf.f); | 595 | readstatus = ferror(lf.f); |
| 596 | if (filename) fclose(lf.f); /* close file (even in case of errors) */ | 596 | if (filename) fclose(lf.f); /* close file (even in case of errors) */ |
