Skip to content

Commit 578eda8

Browse files
author
Michael Vasseur
committed
Fixup
1 parent 544ee29 commit 578eda8

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
@@ -34,8 +34,8 @@ function dj_getopt(string $short_options, array $long_options = []): array
3434
if (str_starts_with($arg, '--') && !array_key_exists(ltrim($arg, '-'), $options)) {
3535
echo "Error: Unknown option: $arg\n";
3636
$unknown_option = true;
37-
} elseif (str_starts_with($arg, '-') {
38-
foreach (ltrim($arg, '-') as $c) {
37+
} elseif (str_starts_with($arg, '-')) {
38+
foreach (str_split(ltrim($arg, '-')) as $c) {
3939
if (!array_key_exists($c, $options)) {
4040
echo "Error: Unknown option: $arg\n";
4141
$unknown_option = true;

0 commit comments

Comments
 (0)