Skip to content

Commit d6e4d3b

Browse files
committed
fix ob1 error in filters
1 parent 7305c72 commit d6e4d3b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

verilogpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ sub expand_autonc($$) {
24122412
my @unused = ();
24132413
foreach my $line (split(/\s*\n\s*/, $macro)) {
24142414
chomp($line);
2415-
if ($line =~ m/^\s*$/) {continue;}
2415+
if ($line =~ m/^\s*$/) {next;}
24162416
if ($line =~ m/^!?m?\/(.*)\/;?$/) {push @regexes, $line;}
24172417
else {push @names, $line;}
24182418
}
@@ -2598,12 +2598,15 @@ sub expand_autointerface($$) {
25982598
next if ($s =~ m/\W/); # Must only contain "word" characters.
25992599

26002600
# If we have filters enabled, skip signals that don't match filters.
2601-
if ($#filters > 0) {
2601+
if ($#filters > -1) {
26022602
my $matched = 0;
26032603
$_ = $s;
26042604
foreach my $filt (@filters) {
26052605
my $result = eval($filt);
2606-
if ($result) { $matched = 1; last; }
2606+
if ($result) {
2607+
$matched = 1;
2608+
last;
2609+
}
26072610
}
26082611
if (!$matched) {
26092612
next;
@@ -2767,7 +2770,7 @@ sub expand_autonet($$) {
27672770
$style = $2;
27682771
}
27692772

2770-
my @filters = [];
2773+
my @filters = ();
27712774
my @macro_lines = split(/\s*[\r\n]\s*/, $macro);
27722775
foreach my $line (@macro_lines) {
27732776
$line =~ s/^\s+//;
@@ -2788,7 +2791,7 @@ sub expand_autonet($$) {
27882791
my $cb_signals = new SignalSet();
27892792

27902793
foreach my $s (@sigs) {
2791-
if ($#filters > 0) {
2794+
if ($#filters > -1) {
27922795
my $matched = 0;
27932796
$_ = $s;
27942797
foreach my $filt (@filters) {

0 commit comments

Comments
 (0)