diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-06-22 16:50:40 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-06-22 16:50:40 +0800 |
| commit | cd2b60b101a398cb9356d746364e70eaed1860f1 (patch) | |
| tree | a1fe71b76faabc4883f16905a94164ce5c23e692 /src/MoonP/stacktraceplus.h | |
| parent | 88c1052e700f38cf3d8ad82d469da4c487760b7e (diff) | |
| download | yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.tar.gz yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.tar.bz2 yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.zip | |
add support for local variable declared with attribute 'close' and 'const' for Lua 5.4.
Diffstat (limited to 'src/MoonP/stacktraceplus.h')
| -rw-r--r-- | src/MoonP/stacktraceplus.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/MoonP/stacktraceplus.h b/src/MoonP/stacktraceplus.h index 3d32322..d658c5c 100644 --- a/src/MoonP/stacktraceplus.h +++ b/src/MoonP/stacktraceplus.h | |||
| @@ -406,8 +406,8 @@ function _M.stacktrace(thread, message, level) | |||
| 406 | end | 406 | end |
| 407 | end | 407 | end |
| 408 | if fname then | 408 | if fname then |
| 409 | fname = fname:gsub("%[string \"", "") | 409 | local fn = fname:match("%[string \"(.-)\"%]") |
| 410 | fname = fname:gsub("\"%]", "") | 410 | if fn then fname = fn end |
| 411 | fname = fname:gsub("^%s*(.-)%s*$", "%1") | 411 | fname = fname:gsub("^%s*(.-)%s*$", "%1") |
| 412 | fname, line = getMoonLineNumber(fname, line) | 412 | fname, line = getMoonLineNumber(fname, line) |
| 413 | if _M.simplified then | 413 | if _M.simplified then |
