Skip to content

Commit

Permalink
dumpvar: Prefix strings with "string(len) "
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Sep 7, 2023
1 parent b3e217f commit 9878973
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lbaselib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,12 @@ static void luaB_dumpvar_impl (lua_State *L, int indents, Table *recursion_marke
const char *s = lua_tolstring(L, -1, &l);
luaL_Buffer b;
luaL_buffinit(L, &b);
if (!is_export) {
luaL_addstring(&b, "string(");
lua_pushinteger(L, l);
luaL_addvalue(&b);
luaL_addstring(&b, ") ");
}
addquoted(&b, s, l);
luaL_pushresult(&b);
return;
Expand Down

0 comments on commit 9878973

Please sign in to comment.