mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-30 07:59:42 +01:00
Fix potential infinite loop due to not restoring pos value after regex
This commit is contained in:
parent
e1588491e3
commit
b7b9ce76ca
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 457,
|
BUILD_REVISION => 458,
|
||||||
BUILD_DATE => "2013-10-22",
|
BUILD_DATE => "2013-10-25",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -720,6 +720,8 @@ while($code =~ m/(.)/msg) {
|
|||||||
substr ($code, $pos, 0) = "\n";
|
substr ($code, $pos, 0) = "\n";
|
||||||
pos $code = $pos;
|
pos $code = $pos;
|
||||||
$cpp = 0;
|
$cpp = 0;
|
||||||
|
} else {
|
||||||
|
pos $code = $pos;
|
||||||
}
|
}
|
||||||
} elsif($ch eq '"') {
|
} elsif($ch eq '"') {
|
||||||
$double_quote = not $double_quote unless $escaped or $single_quote;
|
$double_quote = not $double_quote unless $escaped or $single_quote;
|
||||||
|
Loading…
Reference in New Issue
Block a user