mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 20:09:43 +01:00
Added extra semi-colon before return 0 to allow statements without semi-colons for lazy people; codepad.pl wasn't handling structs correctly because code and precode were backwards -- fixed
This commit is contained in:
parent
a4cdb2204f
commit
1f82cbc285
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 217,
|
||||
BUILD_REVISION => 218,
|
||||
BUILD_DATE => "2010-06-29",
|
||||
};
|
||||
|
||||
|
@ -87,9 +87,9 @@ if($lang eq "C" or $lang eq "C++") {
|
||||
$precode =~ s/\s+$//;
|
||||
|
||||
if(not $has_main) {
|
||||
$code = "$prelude\n\n$code\n\nint main(int argc, char **argv) { $precode return 0;}\n";
|
||||
$code = "$prelude\n\n$code\n\nint main(int argc, char **argv) { $precode\n;\n return 0;}\n";
|
||||
} else {
|
||||
$code = "$prelude\n\n$code\n\n$precode\n";
|
||||
$code = "$prelude\n\n$precode\n\n$code\n";
|
||||
}
|
||||
} else {
|
||||
$code = $precode;
|
||||
|
@ -569,7 +569,7 @@ if($languages{$lang}{'id'} == 1 or $languages{$lang}{'id'} == 11 or $languages{$
|
||||
$precode =~ s/\s+$//;
|
||||
|
||||
if(not $has_main) {
|
||||
$code = "$prelude\n\n$code\n\nint main(int argc, char **argv) { $precode return 0;}\n";
|
||||
$code = "$prelude\n\n$code\n\nint main(int argc, char **argv) { $precode\n;\n return 0;}\n";
|
||||
$nooutput = "Success [no output].";
|
||||
} else {
|
||||
$code = "$prelude\n\n$precode\n\n$code\n";
|
||||
|
Loading…
Reference in New Issue
Block a user