diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-01 11:56:49 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-01 11:56:49 -0200 |
commit | 68587639945aa68844871fdd74a6729b653f523a (patch) | |
tree | cc0efe84ea56f5b03d176768a9771b57bcb5c154 /lstring.c | |
parent | b68fb7f62e1475e28a4cb27569e8b659f925e114 (diff) | |
download | lua-68587639945aa68844871fdd74a6729b653f523a.tar.gz lua-68587639945aa68844871fdd74a6729b653f523a.tar.bz2 lua-68587639945aa68844871fdd74a6729b653f523a.zip |
bug in lua_pushuserdata(L, NULL)
Diffstat (limited to 'lstring.c')
-rw-r--r-- | lstring.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstring.c,v 1.52 2001/01/26 15:58:50 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 1.53 2001/01/29 19:34:02 roberto Exp roberto $ |
3 | ** String table (keeps all strings handled by Lua) | 3 | ** String table (keeps all strings handled by Lua) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -97,7 +97,7 @@ TString *luaS_newudata (lua_State *L, size_t s, void *udata) { | |||
97 | ts->nexthash = NULL; | 97 | ts->nexthash = NULL; |
98 | ts->len = s; | 98 | ts->len = s; |
99 | ts->u.d.tag = 0; | 99 | ts->u.d.tag = 0; |
100 | ts->u.d.value = (udata == NULL) ? uts+1 : udata; | 100 | ts->u.d.value = (s > 0) ? uts+1 : udata; |
101 | /* insert it on table */ | 101 | /* insert it on table */ |
102 | newentry(L, &G(L)->udt, ts, lmod(IntPoint(ts->u.d.value), G(L)->udt.size)); | 102 | newentry(L, &G(L)->udt, ts, lmod(IntPoint(ts->u.d.value), G(L)->udt.size)); |
103 | return ts; | 103 | return ts; |