lua

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

commit b3ce4505296253e6da1fa780c23e7ed012efc88e
parent 24434b59f79975bcca9a15e7bc55d5cab7984bbe
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 15 Jan 2004 10:40:04 -0200

avoid calling `memcmp' with a NULL argument

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

diff --git a/lapi.c b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.251 2003/12/09 16:56:11 roberto Exp roberto $ +** $Id: lapi.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -886,7 +886,7 @@ LUA_API void lua_concat (lua_State *L, int n) { L->top -= (n-1); } else if (n == 0) { /* push empty string */ - setsvalue2s(L, L->top, luaS_newlstr(L, NULL, 0)); + setsvalue2s(L, L->top, luaS_newlstr(L, "", 0)); api_incr_top(L); } /* else n == 1; nothing to do */