mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-10 20:12:35 +01:00
pbot-vm: escape malformed Unicode on STDOUT
This commit is contained in:
parent
110912e85d
commit
1c57e01fad
@ -316,6 +316,10 @@ sub execute {
|
|||||||
|
|
||||||
if ($line =~ /^result:/) {
|
if ($line =~ /^result:/) {
|
||||||
$line =~ s/^result://;
|
$line =~ s/^result://;
|
||||||
|
|
||||||
|
my $octets = decode('UTF-8', $line, sub { sprintf '\\\\x%X', shift });
|
||||||
|
$line = encode('UTF-8', $octets, Encode::FB_CROAK);
|
||||||
|
|
||||||
my $compile_out = decode_json($line);
|
my $compile_out = decode_json($line);
|
||||||
$result .= "$compile_out->{result}\n";
|
$result .= "$compile_out->{result}\n";
|
||||||
$got_result = 1;
|
$got_result = 1;
|
||||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4525,
|
BUILD_REVISION => 4526,
|
||||||
BUILD_DATE => "2022-04-04",
|
BUILD_DATE => "2022-04-04",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user