lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 2779ceeb125e603ea667171d9362e0b766b7abae
parent e93c4547fe632ccae0b48d4d7eaccd79512aa2a0
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed, 18 Oct 2000 15:18:47 -0200

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

Diffstat:
Mlfunc.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lfunc.c b/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) {