Diff

util/xml.lua @ 11127:1d9cd1abc660

util.xml: Fix float formatting of line and columns in error (on Lua 5.3+)
author Kim Alvefur <zash@zash.se>
date Sat, 03 Oct 2020 16:22:56 +0200
parent 8555:4f0f5b49bb03
child 12121:2162e86029b6
line wrap: on
line diff
--- a/util/xml.lua	Sat Oct 03 15:09:12 2020 +0200
+++ b/util/xml.lua	Sat Oct 03 16:22:56 2020 +0200
@@ -71,7 +71,7 @@
 		if ok then
 			return stanza.tags[1];
 		else
-			return ok, err.." (line "..line..", col "..col..")";
+			return ok, ("%s (line %d, col %d))"):format(err, line, col);
 		end
 	end;
 end)();