History

Lua 4.0.1

Lua Team committed 24 years ago

Commit c2bb7181 parent e22497f11 files · +141 −21Browse files

Showing the changes to src/lstring.c (1 of 11 files). Show all

Unified · Split

src/lstring.c+2−2
@@ -1,5 +1,5 @@
11 /*
2−** $Id: lstring.c,v 1.45 2000/10/30 17:49:19 roberto Exp $
2+** $Id: lstring.c,v 1.45a 2000/10/30 17:49:19 roberto Exp $
33 ** String table (keeps all strings handled by Lua)
44 ** See Copyright Notice in lua.h
55 */
@@ -119,7 +119,7 @@ TString *luaS_newudata (lua_State *L, size_t s, void *udata) { · 113 unmodified lines
119119 ts->nexthash = NULL;
120120 ts->len = s;
121121 ts->u.d.tag = 0;
122− ts->u.d.value = (udata == NULL) ? uts+1 : udata;
122+ ts->u.d.value = (s > 0) ? uts+1 : udata;
123123 L->nblocks += sizestring(s);
124124 /* insert it on table */
125125 newentry(L, &L->udt, ts, IntPoint(ts->u.d.value) & (L->udt.size-1));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t