From 2779ceeb125e603ea667171d9362e0b766b7abae Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 18 Oct 2000 15:19:09 -0200 Subject: [PATCH] ((n)-1) may be negative (-1), and so it is not wise to keep it as unsigned --- lfunc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lfunc.c b/lfunc.c index d77c466d..6a012825 100644 --- 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) {