From e67fb5f4cb51fbf4061ab647ef08ef4893b7f0e4 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 8 May 2017 15:41:19 +1000 Subject: Add accessors to TValue for TString values --- src/ldebug.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ldebug.js') diff --git a/src/ldebug.js b/src/ldebug.js index fc5e378..af9b9a9 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -297,7 +297,7 @@ const kname = function(p, pc, c) { if (OC.ISK(c)) { /* is 'c' a constant? */ let kvalue = p.k[OC.INDEXK(c)]; if (kvalue.ttisstring()) { /* literal constant? */ - r.name = kvalue.value; /* it is its own name */ + r.name = kvalue.svalue(); /* it is its own name */ return r; } /* else no reasonable name found */ @@ -408,7 +408,7 @@ const getobjname = function(p, lastpc, reg) { case 'OP_LOADKX': { let b = op === 'OP_LOADK' ? i.Bx : p.code[pc + 1].Ax; if (p.k[b].ttisstring()) { - r.name = p.k[b].value; + r.name = p.k[b].tsvalue(); r.funcname = defs.to_luastring("constant", true); return r; } -- cgit v1.2.3-54-g00ecf