Roberto Ierusalimschy 10 年之前
父节点
当前提交
2de3361c6c
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      ltable.c
  2. 2 2
      ltests.c

+ 2 - 2
ltable.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: ltable.c,v 2.110 2015/05/20 16:22:30 roberto Exp roberto $
+** $Id: ltable.c,v 2.111 2015/06/09 14:21:13 roberto Exp roberto $
 ** Lua tables (hash)
 ** Lua tables (hash)
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -101,7 +101,7 @@ static int l_hashfloat (lua_Number n) {
   lua_Integer ni;
   lua_Integer ni;
   n = l_mathop(frexp)(n, &i) * -cast_num(INT_MIN);
   n = l_mathop(frexp)(n, &i) * -cast_num(INT_MIN);
   if (!lua_numbertointeger(n, &ni)) {  /* is 'n' inf/-inf/NaN? */
   if (!lua_numbertointeger(n, &ni)) {  /* is 'n' inf/-inf/NaN? */
-    lua_assert(luai_numisnan(n) || l_mathop(fabs)(n) == HUGE_VAL);
+    lua_assert(luai_numisnan(n) || l_mathop(fabs)(n) == cast_num(HUGE_VAL));
     return 0;
     return 0;
   }
   }
   else {  /* normal case */
   else {  /* normal case */

+ 2 - 2
ltests.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: ltests.c,v 2.205 2015/04/02 21:10:21 roberto Exp roberto $
+** $Id: ltests.c,v 2.206 2015/06/18 14:25:26 roberto Exp roberto $
 ** Internal Module for Debugging of the Lua Implementation
 ** Internal Module for Debugging of the Lua Implementation
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -911,7 +911,7 @@ static int doremote (lua_State *L) {
 static int int2fb_aux (lua_State *L) {
 static int int2fb_aux (lua_State *L) {
   int b = luaO_int2fb((unsigned int)luaL_checkinteger(L, 1));
   int b = luaO_int2fb((unsigned int)luaL_checkinteger(L, 1));
   lua_pushinteger(L, b);
   lua_pushinteger(L, b);
-  lua_pushinteger(L, luaO_fb2int(b));
+  lua_pushinteger(L, (unsigned int)luaO_fb2int(b));
   return 2;
   return 2;
 }
 }