fix debug_getinfo

This commit is contained in:
fesil 2024-02-26 14:23:15 +08:00
parent 2a843e0286
commit b778623e16

View File

@ -130,6 +130,9 @@ LJLIB_CF(debug_getinfo)
for (; *options; options++) { for (; *options; options++) {
switch (*options) { switch (*options) {
case 'S': case 'S':
#ifdef LJ_DS_DEBUG_GETINFO_PATCH
ar.source = ar.source[0] == '@'? ar.source+1: ar.source;
#endif
settabss(L, "source", ar.source); settabss(L, "source", ar.source);
settabss(L, "short_src", ar.short_src); settabss(L, "short_src", ar.short_src);
settabsi(L, "linedefined", ar.linedefined); settabsi(L, "linedefined", ar.linedefined);