aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-24 09:42:29 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-24 09:42:29 -0200
commitff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b (patch)
tree9259d73174e52b96d5bf72eaf6fc06c89237b8e3 /lstrlib.c
parent463edee2fd6436d9ad6ae9f2f3d36b742416a479 (diff)
downloadlua-ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b.tar.gz
lua-ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b.tar.bz2
lua-ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b.zip
added some casts to avoid warnings in some compilers
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 28e7355a..765ebd32 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.204 2014/10/17 16:28:21 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.205 2014/10/20 16:44:54 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1136,10 +1136,10 @@ static void packint (luaL_Buffer *b, lua_Unsigned n,
1136 char *buff = luaL_prepbuffsize(b, size); 1136 char *buff = luaL_prepbuffsize(b, size);
1137 int i; 1137 int i;
1138 for (i = 0; i < size - 1; i++) { 1138 for (i = 0; i < size - 1; i++) {
1139 buff[islittle ? i : size - 1 - i] = (n & MC); 1139 buff[islittle ? i : size - 1 - i] = (char)(n & MC);
1140 n = (n >> NB) | mask; 1140 n = (n >> NB) | mask;
1141 } 1141 }
1142 buff[islittle ? i : size - 1 - i] = (n & MC); 1142 buff[islittle ? i : size - 1 - i] = (char)(n & MC);
1143 luaL_addsize(b, size); /* add result to buffer */ 1143 luaL_addsize(b, size); /* add result to buffer */
1144} 1144}
1145 1145