summaryrefslogtreecommitdiff
path: root/src/lj_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_str.c')
-rw-r--r--src/lj_str.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_str.c b/src/lj_str.c
index 9aa62582..7b38cecc 100644
--- a/src/lj_str.c
+++ b/src/lj_str.c
@@ -88,7 +88,8 @@ GCstr *lj_str_new(lua_State *L, const char *str, size_t lenx)
88 for (o = gcref(g->strhash[h & g->strmask]); o != NULL; o = gcnext(o)) { 88 for (o = gcref(g->strhash[h & g->strmask]); o != NULL; o = gcnext(o)) {
89 GCstr *tso = gco2str(o); 89 GCstr *tso = gco2str(o);
90 if (tso->len == len && (memcmp(str, strdata(tso), len) == 0)) { 90 if (tso->len == len && (memcmp(str, strdata(tso), len) == 0)) {
91 if (isdead(g, o)) flipwhite(o); /* Resurrect if dead. */ 91 /* Resurrect if dead. Can only happen with fixstring() (keywords). */
92 if (isdead(g, o)) flipwhite(o);
92 return tso; /* Return existing string. */ 93 return tso; /* Return existing string. */
93 } 94 }
94 } 95 }