ソースを参照

((n)-1) may be negative (-1), and so it is not wise to keep it as unsigned

Roberto Ierusalimschy 25 年 前
コミット
2779ceeb12
1 ファイル変更2 行追加2 行削除
  1. 2 2
      lfunc.c

+ 2 - 2
lfunc.c

@@ -1,5 +1,5 @@
 /*
-** $Id: lfunc.c,v 1.31 2000/09/29 12:42:13 roberto Exp roberto $
+** $Id: lfunc.c,v 1.32 2000/10/10 19:52:58 roberto Exp roberto $
 ** Auxiliary functions to manipulate prototypes and closures
 ** See Copyright Notice in lua.h
 */
@@ -14,7 +14,7 @@
 #include "lstate.h"
 
 
-#define sizeclosure(n)	(sizeof(Closure) + (lint32)sizeof(TObject)*((n)-1))
+#define sizeclosure(n)	((int)sizeof(Closure) + (int)sizeof(TObject)*((n)-1))
 
 
 Closure *luaF_newclosure (lua_State *L, int nelems) {