From b7b9ce76ca6764affe3dcafff7e0d8506d432530 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 25 Oct 2013 07:33:43 +0000 Subject: [PATCH] Fix potential infinite loop due to not restoring pos value after regex --- PBot/VERSION.pm | 4 ++-- modules/compiler_vm/compiler_vm_client.pl | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 01688bd7..96ede5ba 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 457, - BUILD_DATE => "2013-10-22", + BUILD_REVISION => 458, + BUILD_DATE => "2013-10-25", }; 1; diff --git a/modules/compiler_vm/compiler_vm_client.pl b/modules/compiler_vm/compiler_vm_client.pl index 5395799b..e7d265fa 100755 --- a/modules/compiler_vm/compiler_vm_client.pl +++ b/modules/compiler_vm/compiler_vm_client.pl @@ -720,6 +720,8 @@ while($code =~ m/(.)/msg) { substr ($code, $pos, 0) = "\n"; pos $code = $pos; $cpp = 0; + } else { + pos $code = $pos; } } elsif($ch eq '"') { $double_quote = not $double_quote unless $escaped or $single_quote;