Skip to content

Commit

Permalink
Merge pull request #282 from mknos/bc-file0
Browse files Browse the repository at this point in the history
bc: filename 0 is not special
  • Loading branch information
briandfoy authored Oct 10, 2023
2 parents ed89d6a + 1ffa8f5 commit 2c4ff08
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/bc
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,8 @@ last switch;
$mathlib=0;
sub command_line()
{
while ($f = shift(@ARGV)) {
while (@ARGV) {
my $f = shift @ARGV;
if ($f eq '-b') {
use Math::BigFloat;
$bignum = 1;
Expand Down Expand Up @@ -2068,7 +2069,9 @@ sub next_file
$cur_file="main::DATA";
return 1;

} elsif($file = shift(@file_list)) {
}
if (@file_list) {
my $file = shift @file_list;

debug { "reading from $file\n" };

Expand Down

0 comments on commit 2c4ff08

Please sign in to comment.