From 3615e44bbee382d2185534445c00913e67852db1 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 4 Oct 2017 08:23:09 -0400 Subject: fix VC warnings for integer down-conversions to char --- c-api/compat-5.3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'c-api/compat-5.3.c') 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) { do { c = getc(lf->f); if (c == EOF || c != *(const unsigned char *)p++) return c; - lf->buff[lf->n++] = c; /* to be read by the parser */ + lf->buff[lf->n++] = (char)c; /* to be read by the parser */ } while (*p != '\0'); lf->n = 0; /* prefix matched; discard it */ return getc(lf->f); /* return next character */ @@ -590,7 +590,7 @@ COMPAT53_API int luaL_loadfilex (lua_State *L, const char *filename, const char compat53_skipcomment(&lf, &c); /* re-read initial portion */ } if (c != EOF) - lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */ + lf.buff[lf.n++] = (char)c; /* 'c' is the first character of the stream */ status = lua_load(L, &compat53_getF, &lf, lua_tostring(L, -1), mode); readstatus = ferror(lf.f); if (filename) fclose(lf.f); /* close file (even in case of errors) */ -- cgit v1.2.3-55-g6feb