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

Interpreter: extract_bracketed/split_line now properly handle a final trailing backslash

This commit is contained in:
Pragmatic Software 2020-05-09 03:13:56 -07:00
parent 1270bef010
commit ca228b9e06

View File

@ -386,6 +386,7 @@ sub extract_bracketed {
$result = '';
} else {
# add final token and exit
$token .= '\\' if $escaped;
$rest .= $token if $extracted;
last;
}
@ -535,6 +536,7 @@ sub split_line {
$token = $last_token;
} else {
# add final token and exit
$token .= '\\' if $escaped;
push @args, $token if length $token;
last;
}