summaryrefslogtreecommitdiff
path: root/src/lstring.c
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2002-07-04 12:00:00 +0000
committerrepogen <>2002-07-04 12:00:00 +0000
commit1981b7c90eb09e956e969cda5c473be4560af573 (patch)
treec392e31135e6e22793bf61e4cd493452f2db4216 /src/lstring.c
parent8cb71cb5548e3138e5d4e4744f52c79d9fafb116 (diff)
downloadlua-github-1981b7c90eb09e956e969cda5c473be4560af573.tar.gz
Lua 4.0.14.0.1
Diffstat (limited to 'src/lstring.c')
-rw-r--r--src/lstring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lstring.c b/src/lstring.c
index e4c7e26c..a415a7d3 100644
--- a/src/lstring.c
+++ b/src/lstring.c
@@ -1,5 +1,5 @@
/*
-** $Id: lstring.c,v 1.45 2000/10/30 17:49:19 roberto Exp $
+** $Id: lstring.c,v 1.45a 2000/10/30 17:49:19 roberto Exp $
** String table (keeps all strings handled by Lua)
** See Copyright Notice in lua.h
*/
@@ -119,7 +119,7 @@ TString *luaS_newudata (lua_State *L, size_t s, void *udata) {
ts->nexthash = NULL;
ts->len = s;
ts->u.d.tag = 0;
- ts->u.d.value = (udata == NULL) ? uts+1 : udata;
+ ts->u.d.value = (s > 0) ? uts+1 : udata;
L->nblocks += sizestring(s);
/* insert it on table */
newentry(L, &L->udt, ts, IntPoint(ts->u.d.value) & (L->udt.size-1));