Browse Source

The default error handler sanitizes error messages to remove non UTF-8 bytes before displaying it. Resolves issue #1330.

--HG--
branch : minor
Alex Szpakowski 8 years ago
parent
commit
a42f27db47
2 changed files with 77 additions and 46 deletions
  1. 27 13
      src/scripts/boot.lua
  2. 50 33
      src/scripts/boot.lua.h

+ 27 - 13
src/scripts/boot.lua

@@ -27,13 +27,13 @@ love.arg = {}
 
 -- Replace any \ with /.
 function love.path.normalslashes(p)
-	return string.gsub(p, "\\", "/")
+	return p:gsub("\\", "/")
 end
 
 -- Makes sure there is a slash at the end
 -- of a path.
 function love.path.endslash(p)
-	if string.sub(p, string.len(p)-1) ~= "/" then
+	if p:sub(-1) ~= "/" then
 		return p .. "/"
 	else
 		return p
@@ -46,13 +46,13 @@ function love.path.abs(p)
 	local tmp = love.path.normalslashes(p)
 
 	-- Path is absolute if it starts with a "/".
-	if string.find(tmp, "/") == 1 then
+	if tmp:find("/") == 1 then
 		return true
 	end
 
 	-- Path is absolute if it starts with a
 	-- letter followed by a colon.
-	if string.find(tmp, "%a:") == 1 then
+	if tmp:find("%a:") == 1 then
 		return true
 	end
 
@@ -87,10 +87,10 @@ function love.path.leaf(p)
 	local last = p
 
 	while a do
-		a = string.find(p, "/", a+1)
+		a = p:find("/", a+1)
 
 		if a then
-			last = string.sub(p, a+1)
+			last = p:sub(a+1)
 		end
 	end
 
@@ -138,7 +138,7 @@ function love.arg.parseOptions()
 	local i = 1
 	while i <= argc do
 		-- Look for options.
-		local m = string.match(arg[i], "^%-%-(.+)")
+		local m = arg[i]:match("^%-%-(.+)")
 
 		if m and love.arg.options[m] then
 			love.arg.optionIndices[i] = true
@@ -602,6 +602,8 @@ function love.threaderror(t, err)
 	error("Thread error ("..tostring(t)..")\n\n"..err, 0)
 end
 
+local utf8 = require("utf8")
+
 local function error_printer(msg, layer)
 	print((debug.traceback("Error: " .. tostring(msg), 1+(layer or 1)):gsub("\n[^\n]+$", "")))
 end
@@ -648,22 +650,34 @@ function love.errhand(msg)
 
 	love.graphics.origin()
 
+	local sanitizedmsg = {}
+	for char in msg:gmatch(utf8.charpattern) do
+		table.insert(sanitizedmsg, char)
+	end
+	sanitizedmsg = table.concat(sanitizedmsg)
+
 	local err = {}
 
 	table.insert(err, "Error\n")
-	table.insert(err, msg.."\n\n")
+	table.insert(err, sanitizedmsg)
+
+	if #sanitizedmsg ~= #msg then
+		table.insert(err, "Invalid UTF-8 string in error message.")
+	end
+
+	table.insert(err, "\n")
 
-	for l in string.gmatch(trace, "(.-)\n") do
-		if not string.match(l, "boot.lua") then
-			l = string.gsub(l, "stack traceback:", "Traceback\n")
+	for l in trace:gmatch("(.-)\n") do
+		if not l:match("boot.lua") then
+			l = l:gsub("stack traceback:", "Traceback\n")
 			table.insert(err, l)
 		end
 	end
 
 	local p = table.concat(err, "\n")
 
-	p = string.gsub(p, "\t", "")
-	p = string.gsub(p, "%[string \"(.-)\"%]", "%1")
+	p = p:gsub("\t", "")
+	p = p:gsub("%[string \"(.-)\"%]", "%1")
 
 	local function draw()
 		local pos = 70

+ 50 - 33
src/scripts/boot.lua.h

@@ -90,8 +90,8 @@ const unsigned char boot_lua[] =
 	0x69, 0x74, 0x68, 0x20, 0x2f, 0x2e, 0x0a,
 	0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x70, 0x61, 0x74, 0x68, 
 	0x2e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x28, 0x70, 0x29, 0x0a,
-	0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 
-	0x62, 0x28, 0x70, 0x2c, 0x20, 0x22, 0x5c, 0x5c, 0x22, 0x2c, 0x20, 0x22, 0x2f, 0x22, 0x29, 0x0a,
+	0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x5c, 
+	0x22, 0x2c, 0x20, 0x22, 0x2f, 0x22, 0x29, 0x0a,
 	0x65, 0x6e, 0x64, 0x0a,
 	0x2d, 0x2d, 0x20, 0x4d, 0x61, 0x6b, 0x65, 0x73, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x72, 
 	0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 
@@ -99,9 +99,8 @@ const unsigned char boot_lua[] =
 	0x2d, 0x2d, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x0a,
 	0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x70, 0x61, 0x74, 0x68, 
 	0x2e, 0x65, 0x6e, 0x64, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x28, 0x70, 0x29, 0x0a,
-	0x09, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x73, 0x75, 0x62, 0x28, 0x70, 0x2c, 0x20, 
-	0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x65, 0x6e, 0x28, 0x70, 0x29, 0x2d, 0x31, 0x29, 0x20, 0x7e, 
-	0x3d, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+	0x09, 0x69, 0x66, 0x20, 0x70, 0x3a, 0x73, 0x75, 0x62, 0x28, 0x2d, 0x31, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x22, 
+	0x2f, 0x22, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
 	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x20, 0x2e, 0x2e, 0x20, 0x22, 0x2f, 0x22, 0x0a,
 	0x09, 0x65, 0x6c, 0x73, 0x65, 0x0a,
 	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x70, 0x0a,
@@ -118,8 +117,8 @@ const unsigned char boot_lua[] =
 	0x09, 0x2d, 0x2d, 0x20, 0x50, 0x61, 0x74, 0x68, 0x20, 0x69, 0x73, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 
 	0x74, 0x65, 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x77, 0x69, 
 	0x74, 0x68, 0x20, 0x61, 0x20, 0x22, 0x2f, 0x22, 0x2e, 0x0a,
-	0x09, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x74, 0x6d, 
-	0x70, 0x2c, 0x20, 0x22, 0x2f, 0x22, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+	0x09, 0x69, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x3a, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x22, 0x2f, 0x22, 0x29, 0x20, 
+	0x3d, 0x3d, 0x20, 0x31, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
 	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x2d, 0x2d, 0x20, 0x50, 0x61, 0x74, 0x68, 0x20, 0x69, 0x73, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 
@@ -127,9 +126,8 @@ const unsigned char boot_lua[] =
 	0x74, 0x68, 0x20, 0x61, 0x0a,
 	0x09, 0x2d, 0x2d, 0x20, 0x6c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 
 	0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x2e, 0x0a,
-	0x09, 0x69, 0x66, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x74, 0x6d, 
-	0x70, 0x2c, 0x20, 0x22, 0x25, 0x61, 0x3a, 0x22, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x74, 0x68, 0x65, 
-	0x6e, 0x0a,
+	0x09, 0x69, 0x66, 0x20, 0x74, 0x6d, 0x70, 0x3a, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x22, 0x25, 0x61, 0x3a, 0x22, 
+	0x29, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
 	0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x2d, 0x2d, 0x20, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x0a,
@@ -173,11 +171,11 @@ const unsigned char boot_lua[] =
 	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x31, 0x0a,
 	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x70, 0x0a,
 	0x09, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x20, 0x64, 0x6f, 0x0a,
-	0x09, 0x09, 0x61, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x69, 0x6e, 0x64, 0x28, 
-	0x70, 0x2c, 0x20, 0x22, 0x2f, 0x22, 0x2c, 0x20, 0x61, 0x2b, 0x31, 0x29, 0x0a,
+	0x09, 0x09, 0x61, 0x20, 0x3d, 0x20, 0x70, 0x3a, 0x66, 0x69, 0x6e, 0x64, 0x28, 0x22, 0x2f, 0x22, 0x2c, 0x20, 
+	0x61, 0x2b, 0x31, 0x29, 0x0a,
 	0x09, 0x09, 0x69, 0x66, 0x20, 0x61, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x73, 
-	0x75, 0x62, 0x28, 0x70, 0x2c, 0x20, 0x61, 0x2b, 0x31, 0x29, 0x0a,
+	0x09, 0x09, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x70, 0x3a, 0x73, 0x75, 0x62, 0x28, 0x61, 0x2b, 
+	0x31, 0x29, 0x0a,
 	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x0a,
@@ -233,9 +231,9 @@ const unsigned char boot_lua[] =
 	0x6f, 0x0a,
 	0x09, 0x09, 0x2d, 0x2d, 0x20, 0x4c, 0x6f, 0x6f, 0x6b, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 
 	0x6f, 0x6e, 0x73, 0x2e, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 
-	0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x61, 0x72, 0x67, 0x5b, 0x69, 0x5d, 0x2c, 0x20, 0x22, 0x5e, 0x25, 
-	0x2d, 0x25, 0x2d, 0x28, 0x2e, 0x2b, 0x29, 0x22, 0x29, 0x0a,
+	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x5b, 0x69, 0x5d, 
+	0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x5e, 0x25, 0x2d, 0x25, 0x2d, 0x28, 0x2e, 0x2b, 0x29, 0x22, 
+	0x29, 0x0a,
 	0x09, 0x09, 0x69, 0x66, 0x20, 0x6d, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 
 	0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5b, 0x6d, 0x5d, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
 	0x09, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 
@@ -1105,6 +1103,8 @@ const unsigned char boot_lua[] =
 	0x6f, 0x72, 0x20, 0x28, 0x22, 0x2e, 0x2e, 0x74, 0x6f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x74, 0x29, 
 	0x2e, 0x2e, 0x22, 0x29, 0x5c, 0x6e, 0x5c, 0x6e, 0x22, 0x2e, 0x2e, 0x65, 0x72, 0x72, 0x2c, 0x20, 0x30, 0x29, 0x0a,
 	0x65, 0x6e, 0x64, 0x0a,
+	0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x75, 0x74, 0x66, 0x38, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 
+	0x72, 0x65, 0x28, 0x22, 0x75, 0x74, 0x66, 0x38, 0x22, 0x29, 0x0a,
 	0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x72, 0x72, 
 	0x6f, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x28, 0x6d, 0x73, 0x67, 0x2c, 0x20, 0x6c, 0x61, 
 	0x79, 0x65, 0x72, 0x29, 0x0a,
@@ -1181,32 +1181,49 @@ const unsigned char boot_lua[] =
 	0x75, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x29, 0x0a,
 	0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x6f, 0x72, 0x69, 
 	0x67, 0x69, 0x6e, 0x28, 0x29, 0x0a,
+	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x6d, 0x73, 
+	0x67, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a,
+	0x09, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x6d, 0x73, 0x67, 0x3a, 0x67, 
+	0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x75, 0x74, 0x66, 0x38, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x70, 0x61, 0x74, 
+	0x74, 0x65, 0x72, 0x6e, 0x29, 0x20, 0x64, 0x6f, 0x0a,
+	0x09, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x73, 0x61, 0x6e, 
+	0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x6d, 0x73, 0x67, 0x2c, 0x20, 0x63, 0x68, 0x61, 0x72, 0x29, 0x0a,
+	0x09, 0x65, 0x6e, 0x64, 0x0a,
+	0x09, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x6d, 0x73, 0x67, 0x20, 0x3d, 0x20, 0x74, 0x61, 
+	0x62, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 
+	0x65, 0x64, 0x6d, 0x73, 0x67, 0x29, 0x0a,
 	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 0x7b, 0x7d, 0x0a,
 	0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x65, 0x72, 0x72, 0x2c, 
 	0x20, 0x22, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x5c, 0x6e, 0x22, 0x29, 0x0a,
 	0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x65, 0x72, 0x72, 0x2c, 
-	0x20, 0x6d, 0x73, 0x67, 0x2e, 0x2e, 0x22, 0x5c, 0x6e, 0x5c, 0x6e, 0x22, 0x29, 0x0a,
-	0x09, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 
-	0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x22, 0x28, 0x2e, 0x2d, 0x29, 
-	0x5c, 0x6e, 0x22, 0x29, 0x20, 0x64, 0x6f, 0x0a,
-	0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x61, 
-	0x74, 0x63, 0x68, 0x28, 0x6c, 0x2c, 0x20, 0x22, 0x62, 0x6f, 0x6f, 0x74, 0x2e, 0x6c, 0x75, 0x61, 0x22, 0x29, 
-	0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x6c, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 
-	0x28, 0x6c, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x20, 0x74, 0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 
-	0x63, 0x6b, 0x3a, 0x22, 0x2c, 0x20, 0x22, 0x54, 0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 0x63, 0x6b, 0x5c, 0x6e, 
-	0x22, 0x29, 0x0a,
+	0x20, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x6d, 0x73, 0x67, 0x29, 0x0a,
+	0x09, 0x69, 0x66, 0x20, 0x23, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x6d, 0x73, 0x67, 0x20, 
+	0x7e, 0x3d, 0x20, 0x23, 0x6d, 0x73, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+	0x09, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x65, 0x72, 0x72, 
+	0x2c, 0x20, 0x22, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x20, 0x73, 
+	0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 
+	0x73, 0x61, 0x67, 0x65, 0x2e, 0x22, 0x29, 0x0a,
+	0x09, 0x65, 0x6e, 0x64, 0x0a,
+	0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x65, 0x72, 0x72, 0x2c, 
+	0x20, 0x22, 0x5c, 0x6e, 0x22, 0x29, 0x0a,
+	0x09, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x72, 0x61, 0x63, 0x65, 0x3a, 0x67, 0x6d, 
+	0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x28, 0x2e, 0x2d, 0x29, 0x5c, 0x6e, 0x22, 0x29, 0x20, 0x64, 0x6f, 0x0a,
+	0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 
+	0x62, 0x6f, 0x6f, 0x74, 0x2e, 0x6c, 0x75, 0x61, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+	0x09, 0x09, 0x09, 0x6c, 0x20, 0x3d, 0x20, 0x6c, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x73, 0x74, 0x61, 
+	0x63, 0x6b, 0x20, 0x74, 0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x22, 0x2c, 0x20, 0x22, 0x54, 
+	0x72, 0x61, 0x63, 0x65, 0x62, 0x61, 0x63, 0x6b, 0x5c, 0x6e, 0x22, 0x29, 0x0a,
 	0x09, 0x09, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x28, 0x65, 0x72, 
 	0x72, 0x2c, 0x20, 0x6c, 0x29, 0x0a,
 	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x63, 
 	0x6f, 0x6e, 0x63, 0x61, 0x74, 0x28, 0x65, 0x72, 0x72, 0x2c, 0x20, 0x22, 0x5c, 0x6e, 0x22, 0x29, 0x0a,
-	0x09, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x70, 
-	0x2c, 0x20, 0x22, 0x5c, 0x74, 0x22, 0x2c, 0x20, 0x22, 0x22, 0x29, 0x0a,
-	0x09, 0x70, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x28, 0x70, 
-	0x2c, 0x20, 0x22, 0x25, 0x5b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x5c, 0x22, 0x28, 0x2e, 0x2d, 0x29, 
-	0x5c, 0x22, 0x25, 0x5d, 0x22, 0x2c, 0x20, 0x22, 0x25, 0x31, 0x22, 0x29, 0x0a,
+	0x09, 0x70, 0x20, 0x3d, 0x20, 0x70, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x74, 0x22, 0x2c, 0x20, 
+	0x22, 0x22, 0x29, 0x0a,
+	0x09, 0x70, 0x20, 0x3d, 0x20, 0x70, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x25, 0x5b, 0x73, 0x74, 0x72, 
+	0x69, 0x6e, 0x67, 0x20, 0x5c, 0x22, 0x28, 0x2e, 0x2d, 0x29, 0x5c, 0x22, 0x25, 0x5d, 0x22, 0x2c, 0x20, 0x22, 
+	0x25, 0x31, 0x22, 0x29, 0x0a,
 	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x72, 
 	0x61, 0x77, 0x28, 0x29, 0x0a,
 	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x37, 0x30, 0x0a,