Use getshrstr()

This commit is contained in:
Cloud Wu
2024-06-26 13:05:27 +08:00
parent afb50a0587
commit 41928512f0

View File

@@ -45,8 +45,7 @@ int luaS_eqlngstr (TString *a, TString *b) {
int luaS_eqshrstr (TString *a, TString *b) {
int r;
lu_byte len = a->shrlen;
lua_assert(b->tt == LUA_VSHRSTR);
r = len == b->shrlen && (memcmp(getstr(a), getstr(b), len) == 0);
r = len == b->shrlen && (memcmp(getshrstr(a), getshrstr(b), len) == 0);
if (r) {
if (a->id < b->id) {
a->id = b->id;