Skip to content

Commit

Permalink
Update Pluto stuff for 9b4f39ab14fb2e55345c3d23537d129dac23b091
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan authored and well-in-that-case committed Sep 2, 2023
1 parent 920d712 commit 0f5b5ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ void luaV_finishget (lua_State *L, const TValue *t, TValue *key, StkId val,
if (isValueString) { /* index for character of string */
lua_Integer index = ivalue(key);
if (index < 0) { /* negative index, index from end of string */
index += vslen(t) + 1;
index += tsslen(tsvalue(t)) + 1;
}
if (((lua_Integer)vslen(t) < index) || (index < 1)) { /* invalid index */
if (((lua_Integer)tsslen(tsvalue(t)) < index) || (index < 1)) { /* invalid index */
setnilvalue(s2v(val));
return;
}
Expand Down Expand Up @@ -2645,7 +2645,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
std::string old = stringify_tvalue(a); /* RA will be changed below. */
#endif
if (ttisstring(a) && ttisstring(b)) {
if (strstr(svalue(b), svalue(a)) != nullptr)
if (strstr(getstr(tsvalue(b)), getstr(tsvalue(a))) != nullptr)
setbtvalue(s2v(ra));
else
setbfvalue(s2v(ra));
Expand Down

0 comments on commit 0f5b5ad

Please sign in to comment.