aboutsummaryrefslogtreecommitdiff
path: root/pretty_errors.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-09-14 14:00:48 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-09-14 14:01:07 -0700
commit7c1f2dfd69afe119322e19b3a4061876b3dd1033 (patch)
treeee540007cdad2681b03a208c657811591da58cc9 /pretty_errors.lua
parent4d48bf359df98512a2a741d48ea222d055b733c0 (diff)
Fixes and improvements, and ported nomsu.3.peg to new tidier syntax.
Diffstat (limited to 'pretty_errors.lua')
-rw-r--r--pretty_errors.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/pretty_errors.lua b/pretty_errors.lua
index 7402703..ae6b48f 100644
--- a/pretty_errors.lua
+++ b/pretty_errors.lua
@@ -42,6 +42,7 @@ format_error = function(err)
err_msg = err_msg .. "\n\027[2m" .. tostring(fmt_str:format(err_linenum)) .. tostring(err_line) .. "\027[0m"
end
local _, err_linenum_end, err_linepos_end = string2.line_at(err.source, err.stop)
+ err_linenum_end = err_linenum_end or err_linenum
if err_linenum_end == err_linenum then
err_msg = err_msg .. "\n" .. tostring(pointer)
else