aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-08-23 15:14:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-08-23 15:14:03 -0300
commitc815c2f0eb7a4ac01d4f664f3db44c199ee4e211 (patch)
tree63cdeea69af0df9ff82303d05c517068eb54e56e /lapi.c
parentab6a94952215b1f66436d8eeebded1dad9fa5409 (diff)
parent9363a8b9901a5643c9da061ea8dda8a86cdc7ef1 (diff)
downloadlua-c815c2f0eb7a4ac01d4f664f3db44c199ee4e211.tar.gz
lua-c815c2f0eb7a4ac01d4f664f3db44c199ee4e211.tar.bz2
lua-c815c2f0eb7a4ac01d4f664f3db44c199ee4e211.zip
Merge branch 'master' into nextversion
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index a1eb7dc6..767fa55e 100644
--- a/lapi.c
+++ b/lapi.c
@@ -417,9 +417,9 @@ LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) {
417 o = index2value(L, idx); /* previous call may reallocate the stack */ 417 o = index2value(L, idx); /* previous call may reallocate the stack */
418 } 418 }
419 if (len != NULL) 419 if (len != NULL)
420 *len = vslen(o); 420 *len = tsslen(tsvalue(o));
421 lua_unlock(L); 421 lua_unlock(L);
422 return svalue(o); 422 return getstr(tsvalue(o));
423} 423}
424 424
425 425