浏览代码

C++ warning

Roberto Ierusalimschy 23 年之前
父节点
当前提交
0436c96866
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      ltablib.c

+ 2 - 2
ltablib.c

@@ -1,5 +1,5 @@
 /*
-** $Id: ltablib.c,v 1.8 2002/06/25 19:16:44 roberto Exp roberto $
+** $Id: ltablib.c,v 1.9 2002/07/01 19:25:28 roberto Exp roberto $
 ** Library for Table Manipulation
 ** See Copyright Notice in lua.h
 */
@@ -16,7 +16,7 @@
 
 
 static int checkint (lua_State *L) {
-  int n = lua_tonumber(L, -1);
+  int n = (int)lua_tonumber(L, -1);
   if (n == 0 && !lua_isnumber(L, -1)) n = -1;
   lua_pop(L, 1);
   return n;