aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lstrlib.c b/lstrlib.c
index b73b306e..eb40995f 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.200 2014/07/30 13:59:24 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.201 2014/08/20 22:06:41 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*/
@@ -890,7 +890,7 @@ static int str_format (lua_State *L) {
890 strfrmt = scanformat(L, strfrmt, form); 890 strfrmt = scanformat(L, strfrmt, form);
891 switch (*strfrmt++) { 891 switch (*strfrmt++) {
892 case 'c': { 892 case 'c': {
893 nb = sprintf(buff, form, luaL_checkint(L, arg)); 893 nb = sprintf(buff, form, (int)luaL_checkinteger(L, arg));
894 break; 894 break;
895 } 895 }
896 case 'd': case 'i': 896 case 'd': case 'i':
@@ -984,11 +984,11 @@ static int getendian (lua_State *L, int arg) {
984 984
985 985
986static int getintsize (lua_State *L, int arg) { 986static int getintsize (lua_State *L, int arg) {
987 int size = luaL_optint(L, arg, 0); 987 lua_Integer size = luaL_optinteger(L, arg, 0);
988 if (size == 0) size = SZINT; 988 if (size == 0) size = SZINT;
989 luaL_argcheck(L, 1 <= size && size <= MAXINTSIZE, arg, 989 luaL_argcheck(L, 1 <= size && size <= MAXINTSIZE, arg,
990 "integer size out of valid range"); 990 "integer size out of valid range");
991 return size; 991 return (int)size;
992} 992}
993 993
994 994