3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-29 07:19:23 +01:00

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

View File

@ -144,7 +144,7 @@ sub gdb_read_result($out) {
sub gdbmi_to_json($text, $makejson = 1) { sub gdbmi_to_json($text, $makejson = 1) {
$text =~ s/([\w-]+)=/"$1":/g if $makejson; $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}"); return decode_json("{$text}");
} }