Skip to content

Commit 679de55

Browse files
Do not escape $@ twice in validator run script generator.
This would escape it in the output file, which is wrong.
1 parent c4b0927 commit 679de55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

judge/judgedaemon.main.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,13 @@ function fetch_executable_internal(
418418
// no main class detection here
419419
$buildscript .= "echo 'COMPARE_DIR=\$(dirname \"\$0\")' >> run\n";
420420
$mainClass = basename($unescapedSource, '.java');
421-
$buildscript .= "echo 'java -cp \"\$COMPARE_DIR\" $mainClass \"\\\$@\"' >> run\n";
421+
$buildscript .= "echo 'java -cp \"\$COMPARE_DIR\" $mainClass \"\$@\"' >> run\n";
422422
$buildscript .= "chmod +x run\n";
423423
break;
424424
case 'py':
425425
$buildscript .= "echo '#!/bin/sh' > run\n";
426426
$buildscript .= "echo 'COMPARE_DIR=\$(dirname \"\$0\")' >> run\n";
427-
$buildscript .= "echo 'python3 \$COMPARE_DIR/$source' \"\\\$@\" >> run\n";
427+
$buildscript .= "echo 'python3 \$COMPARE_DIR/$source' \"\$@\" >> run\n";
428428
$buildscript .= "chmod +x run\n";
429429
break;
430430
}

0 commit comments

Comments
 (0)