diff options
-rw-r--r-- | lstring.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -53,8 +53,8 @@ static TString *newlstr (lua_State *L, const char *str, size_t l, lu_hash h) { | |||
53 | ts->tsv.len = l; | 53 | ts->tsv.len = l; |
54 | ts->tsv.hash = h; | 54 | ts->tsv.hash = h; |
55 | ts->tsv.marked = 0; | 55 | ts->tsv.marked = 0; |
56 | memcpy(getstr(ts), str, l*sizeof(char)); | 56 | memcpy(ts+1, str, l*sizeof(char)); |
57 | getstr(ts)[l] = '\0'; /* ending 0 */ | 57 | ((char *)(ts+1))[l] = '\0'; /* ending 0 */ |
58 | tb = &G(L)->strt; | 58 | tb = &G(L)->strt; |
59 | h = lmod(h, tb->size); | 59 | h = lmod(h, tb->size); |
60 | ts->tsv.nexthash = tb->hash[h]; /* chain new entry */ | 60 | ts->tsv.nexthash = tb->hash[h]; /* chain new entry */ |