diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-23 08:33:41 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-23 08:45:34 +0100 |
commit | 99564913987698cdfc2528a93b5157030e637ced (patch) | |
tree | 49963f4e7358367cb3c6a4a5784cb1dd6c97de33 /src/ldebug.js | |
parent | 9e08fa3a4b9f8848bb4eac3e745079282099a3d8 (diff) | |
download | fengari-99564913987698cdfc2528a93b5157030e637ced.tar.gz fengari-99564913987698cdfc2528a93b5157030e637ced.tar.bz2 fengari-99564913987698cdfc2528a93b5157030e637ced.zip |
dofile
Diffstat (limited to 'src/ldebug.js')
-rw-r--r-- | src/ldebug.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ldebug.js b/src/ldebug.js index 529cb0c..3b01263 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -431,7 +431,14 @@ const varinfo = function(L, o) { kind = getobjname(ci.func.p, ci.pcOff, stkid - ci.u.l.base); } - return kind ? ` (${kind.funcname} '${kind.name.jsstring()}')` : ``; + if (kind) { + let funcname = kind.funcname instanceof TValue ? kind.funcname.jsstring() : kind.funcname; + let name = kind.name instanceof TValue ? kind.name.jsstring() : kind.name; + + return ` (${funcname} '${name}')`; + } + + return ``; }; const luaG_typeerror = function(L, o, op) { |