3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 22:09:26 +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 = ''; $result = '';
} else { } else {
# add final token and exit # add final token and exit
$token .= '\\' if $escaped;
$rest .= $token if $extracted; $rest .= $token if $extracted;
last; last;
} }
@ -535,6 +536,7 @@ sub split_line {
$token = $last_token; $token = $last_token;
} else { } else {
# add final token and exit # add final token and exit
$token .= '\\' if $escaped;
push @args, $token if length $token; push @args, $token if length $token;
last; last;
} }