From 5c46721a1cc32bdb8f700955f9b441a08056f7b0 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Sat, 26 Feb 2022 07:55:53 +0100 Subject: [PATCH] tools/mpy-tool.py: Fix frozen comment generation to escape chars. That caused the compile of frozen_content.c to fail if characters like backslash were in a short string. Thanks to @hippy for identifying the spot to change. --- tools/mpy-tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py index da6352dab7..73753094ec 100755 --- a/tools/mpy-tool.py +++ b/tools/mpy-tool.py @@ -861,7 +861,7 @@ class RawCodeBytecode(RawCode): fmt, sz, arg = mp_opcode_decode(bc, ip) opcode_name = Opcodes.mapping[bc[ip]] if fmt == MP_BC_FORMAT_QSTR: - opcode_name += " " + self.qstr_table[arg].str + opcode_name += " " + repr(self.qstr_table[arg].str) elif fmt in (MP_BC_FORMAT_VAR_UINT, MP_BC_FORMAT_OFFSET): opcode_name += " %u" % arg print(