diff options
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 2.18 2010/05/10 18:23:45 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 2.19 2011/05/03 16:01:57 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 | */ |
| @@ -65,7 +65,7 @@ static TString *newlstr (lua_State *L, const char *str, size_t l, | |||
| 65 | ts = &luaC_newobj(L, LUA_TSTRING, totalsize, list, 0)->ts; | 65 | ts = &luaC_newobj(L, LUA_TSTRING, totalsize, list, 0)->ts; |
| 66 | ts->tsv.len = l; | 66 | ts->tsv.len = l; |
| 67 | ts->tsv.hash = h; | 67 | ts->tsv.hash = h; |
| 68 | ts->tsv.reserved = 0; | 68 | ts->tsv.extra = 0; |
| 69 | memcpy(ts+1, str, l*sizeof(char)); | 69 | memcpy(ts+1, str, l*sizeof(char)); |
| 70 | ((char *)(ts+1))[l] = '\0'; /* ending 0 */ | 70 | ((char *)(ts+1))[l] = '\0'; /* ending 0 */ |
| 71 | tb->nuse++; | 71 | tb->nuse++; |
