From f9bd3ebb687c5c5b14528a727d12d1d534e41b26 Mon Sep 17 00:00:00 2001 From: Avril112113 Date: Mon, 24 Jun 2024 14:49:20 +0100 Subject: [PATCH] Escape trace name --- tool/transform_swaddon_tracing.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/transform_swaddon_tracing.lua b/tool/transform_swaddon_tracing.lua index 663cad3..8b1924c 100644 --- a/tool/transform_swaddon_tracing.lua +++ b/tool/transform_swaddon_tracing.lua @@ -91,7 +91,7 @@ function TransformerDefs:_add_trace_info(node, name, start_line, start_column, l ) )), ASTNodes.expressionlist(node, ASTNodes.table(node, ASTNodes.fieldlist(node, - ASTNodes.field(node, ASTNodes.string(node, "name"), ASTNodes.string(node, name)), + ASTNodes.field(node, ASTNodes.string(node, "name"), ASTNodes.string(node, Utils.escape_escape_sequences(name))), ASTNodes.field(node, ASTNodes.string(node, "line"), ASTNodes.numeral(node, tostring(start_line))), ASTNodes.field(node, ASTNodes.string(node, "column"), ASTNodes.numeral(node, tostring(start_column))), ASTNodes.field(node, ASTNodes.string(node, "file"), ASTNodes.string(node, local_file_path))