bugfix, See issue #1027

This commit is contained in:
Cloud Wu
2019-06-15 00:29:05 +08:00
parent 5a0f68999e
commit 6f0e88dc59
4 changed files with 12 additions and 4 deletions

View File

@@ -935,6 +935,7 @@ new_string(unsigned int h, const char *str, lu_byte l) {
memset(ts, 0, sz);
setbits(ts->marked, WHITEBITS);
gray2black(ts);
makeshared(ts);
ts->tt = LUA_TSHRSTR;
ts->hash = h;
ts->shrlen = l;