aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-18 15:19:09 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-18 15:19:09 -0200
commit2779ceeb125e603ea667171d9362e0b766b7abae (patch)
tree1dc746a60fd2c7c4e48aaf0036c1cdb75e166863
parente93c4547fe632ccae0b48d4d7eaccd79512aa2a0 (diff)
downloadlua-2779ceeb125e603ea667171d9362e0b766b7abae.tar.gz
lua-2779ceeb125e603ea667171d9362e0b766b7abae.tar.bz2
lua-2779ceeb125e603ea667171d9362e0b766b7abae.zip
((n)-1) may be negative (-1), and so it is not wise to keep it as unsigned
-rw-r--r--lfunc.c4
1 files 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 @@
1/* 1/*
2** $Id: lfunc.c,v 1.31 2000/09/29 12:42:13 roberto Exp roberto $ 2** $Id: lfunc.c,v 1.32 2000/10/10 19:52:58 roberto Exp roberto $
3** Auxiliary functions to manipulate prototypes and closures 3** Auxiliary functions to manipulate prototypes and closures
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -14,7 +14,7 @@
14#include "lstate.h" 14#include "lstate.h"
15 15
16 16
17#define sizeclosure(n) (sizeof(Closure) + (lint32)sizeof(TObject)*((n)-1)) 17#define sizeclosure(n) ((int)sizeof(Closure) + (int)sizeof(TObject)*((n)-1))
18 18
19 19
20Closure *luaF_newclosure (lua_State *L, int nelems) { 20Closure *luaF_newclosure (lua_State *L, int nelems) {