diff options
| -rw-r--r-- | compat53.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compat53.lua b/compat53.lua index 4a78260..84ef101 100644 --- a/compat53.lua +++ b/compat53.lua | |||
| @@ -697,13 +697,14 @@ if lua_version < "5.3" then | |||
| 697 | return pcall_exec(current, pcall_coroutine(func), ...) | 697 | return pcall_exec(current, pcall_coroutine(func), ...) |
| 698 | end | 698 | end |
| 699 | 699 | ||
| 700 | local _tostring = tostring | ||
| 700 | local function xpcall_catch(current, call, msgh, success, ...) | 701 | local function xpcall_catch(current, call, msgh, success, ...) |
| 701 | if not success then | 702 | if not success then |
| 702 | xpcall_running[current] = call | 703 | xpcall_running[current] = call |
| 703 | local ok, result = _pcall(msgh, ...) | 704 | local ok, result = _pcall(msgh, ...) |
| 704 | xpcall_running[current] = nil | 705 | xpcall_running[current] = nil |
| 705 | if not ok then | 706 | if not ok then |
| 706 | return false, "error in error handling ("..tostring(result)..")" | 707 | return false, "error in error handling (".._tostring(result)..")" |
| 707 | end | 708 | end |
| 708 | return false, result | 709 | return false, result |
| 709 | end | 710 | end |
| @@ -735,6 +736,7 @@ if lua_version < "5.3" then | |||
| 735 | end | 736 | end |
| 736 | 737 | ||
| 737 | 738 | ||
| 739 | local package = package | ||
| 738 | if not is_luajit then | 740 | if not is_luajit then |
| 739 | local io_open = io.open | 741 | local io_open = io.open |
| 740 | local table_concat = table.concat | 742 | local table_concat = table.concat |
