diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 66bf647a..a2e6eff7 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 => 550, - BUILD_DATE => "2014-04-22", + BUILD_REVISION => 551, + BUILD_DATE => "2014-04-26", }; 1; diff --git a/modules/compiler_vm/compiler_vm_client.pl b/modules/compiler_vm/compiler_vm_client.pl index 8fa3e287..7dbfb2ab 100755 --- a/modules/compiler_vm/compiler_vm_client.pl +++ b/modules/compiler_vm/compiler_vm_client.pl @@ -865,7 +865,7 @@ if($lang eq 'C89' or $lang eq 'C99' or $lang eq 'C11' or $lang eq 'C++') { print "looking for functions, has main: $has_main\n" if $debug >= 2; - my $func_regex = qr/^([ *\w]+)\s+([*\w]+)\s*\(([^;{]*)\s*\)\s*({.*|<%.*|\?\?<.*)/ims; + my $func_regex = qr/^([ *\w]+)\s+([ ()*\w]+)\s*\(([^;{]*)\s*\)\s*({.*|<%.*|\?\?<.*)/ims; # look for potential functions to extract while($preprecode =~ /$func_regex/ms) { @@ -925,7 +925,7 @@ if($lang eq 'C89' or $lang eq 'C99' or $lang eq 'C11' or $lang eq 'C++') { print "final extract: [$ret][$ident][$params][$body]\n" if $debug; $code .= "$ret $ident($params) $body\n\n"; - $has_main = 1 if $ident eq 'main'; + $has_main = 1 if $ident =~ m/^\s*\(?\s*main\s*\)?\s*$/; } $precode =~ s/^\s+//;