short string in matrix should be in fixed set

This commit is contained in:
Cloud Wu
2019-06-13 17:55:45 +08:00
parent 7fed938593
commit b45384cc9f
2 changed files with 4 additions and 2 deletions

View File

@@ -47,7 +47,10 @@ mark_shared(lua_State *L) {
case LUA_TSTRING: {
const char *str = lua_tostring(L, idx);
TString *ts = (TString *)(str - sizeof(UTString));
makeshared(ts);
if(ts->tt == LUA_TLNGSTR)
makeshared(ts);
else
luaS_fix(G(L), ts);
break;
}
default: