Skip to content

Commit e5bc758

Browse files
committed
Apk: initialize pushback in loop creation
Otherwise we do not parse the line after the loop.
1 parent b61443e commit e5bc758

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Build/Apk.pm

+2
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,14 @@ sub parse {
351351
my @vals = unquotesplit($2, \%vars);
352352
my $body = readloopbody(\*PKG);
353353
$inloop = [ 0, 'for', $var, \@vals, $body ] if $body && @vals;
354+
push @pushback, 'done' if $inloop;
354355
next;
355356
}
356357
if ($preamble && !$inloop && !@pushback && /^while\s+\[\s(.+)\s+]\s*;\s*do\s*$/) {
357358
my $cond = $1;
358359
my $body = readloopbody(\*PKG);
359360
$inloop = [ 0, 'while', undef, $cond, $body ] if $body;
361+
push @pushback, 'done' if $inloop;
360362
next;
361363
}
362364

0 commit comments

Comments
 (0)