diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-01-15 10:40:26 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-01-15 10:40:26 -0200 |
| commit | b3ce4505296253e6da1fa780c23e7ed012efc88e (patch) | |
| tree | 957fea8ce9906f2bbd70b0f417c9aa838ec50443 | |
| parent | 24434b59f79975bcca9a15e7bc55d5cab7984bbe (diff) | |
| download | lua-b3ce4505296253e6da1fa780c23e7ed012efc88e.tar.gz lua-b3ce4505296253e6da1fa780c23e7ed012efc88e.tar.bz2 lua-b3ce4505296253e6da1fa780c23e7ed012efc88e.zip | |
avoid calling `memcmp' with a NULL argument
| -rw-r--r-- | lapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.251 2003/12/09 16:56:11 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.1 2003/12/10 12:13:36 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -886,7 +886,7 @@ LUA_API void lua_concat (lua_State *L, int n) { | |||
| 886 | L->top -= (n-1); | 886 | L->top -= (n-1); |
| 887 | } | 887 | } |
| 888 | else if (n == 0) { /* push empty string */ | 888 | else if (n == 0) { /* push empty string */ |
| 889 | setsvalue2s(L, L->top, luaS_newlstr(L, NULL, 0)); | 889 | setsvalue2s(L, L->top, luaS_newlstr(L, "", 0)); |
| 890 | api_incr_top(L); | 890 | api_incr_top(L); |
| 891 | } | 891 | } |
| 892 | /* else n == 1; nothing to do */ | 892 | /* else n == 1; nothing to do */ |
