pbot-vm: do not decode non-printable characters

This commit is contained in:
Pragmatic Software 2022-02-24 12:55:27 -08:00
parent 76fd5f5fd7
commit 66856441e4
1 changed files with 1 additions and 1 deletions

View File

@ -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}");
}