From ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 24 Oct 2014 09:42:29 -0200 Subject: added some casts to avoid warnings in some compilers --- lstrlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lstrlib.c') diff --git a/lstrlib.c b/lstrlib.c index 28e7355a..765ebd32 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.204 2014/10/17 16:28:21 roberto Exp roberto $ +** $Id: lstrlib.c,v 1.205 2014/10/20 16:44:54 roberto Exp roberto $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -1136,10 +1136,10 @@ static void packint (luaL_Buffer *b, lua_Unsigned n, char *buff = luaL_prepbuffsize(b, size); int i; for (i = 0; i < size - 1; i++) { - buff[islittle ? i : size - 1 - i] = (n & MC); + buff[islittle ? i : size - 1 - i] = (char)(n & MC); n = (n >> NB) | mask; } - buff[islittle ? i : size - 1 - i] = (n & MC); + buff[islittle ? i : size - 1 - i] = (char)(n & MC); luaL_addsize(b, size); /* add result to buffer */ } -- cgit v1.2.3-55-g6feb