From 66856441e44c780f7b63b5017e0dda484976bed1 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 24 Feb 2022 12:55:27 -0800 Subject: [PATCH] pbot-vm: do not decode non-printable characters --- applets/pbot-vm/guest/bin/guest-gdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applets/pbot-vm/guest/bin/guest-gdb b/applets/pbot-vm/guest/bin/guest-gdb index 27f9583c..44071af1 100755 --- a/applets/pbot-vm/guest/bin/guest-gdb +++ b/applets/pbot-vm/guest/bin/guest-gdb @@ -144,7 +144,7 @@ sub gdb_read_result($out) { sub gdbmi_to_json($text, $makejson = 1) { $text =~ s/([\w-]+)=/"$1":/g if $makejson; - $text =~ s/\\(\d{3})/chr oct $1/ge; + $text =~ s/\\(\d{3})/$1 >= 0x20 ? chr oct $1 : "\\$1"/ge; return decode_json("{$text}"); }