From 0aa2011369b98751d4c8776f9a07dbec92d12f60 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 24 Nov 2021 16:05:23 +0000 Subject: [PATCH] Bug 28832: (follow-up) Don't remove false values, only empty strings Signed-off-by: Martin Renvoize Signed-off-by: Andrew Fuerste-Henry (cherry picked from commit 117d826bf3b10c98a903fd0ed032fc9cb888741d) Signed-off-by: Victor Grousset/tuxayo --- tools/batchMod.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 0133ca81d3..09586fcbec 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -125,13 +125,14 @@ if ($op eq "action") { # Clear the fields we are not editing, leave fields we are blanking foreach( my $i = 0; $i < scalar @values; $i++ ){ - unless( $values[$i] || $searches[$i] || grep { $subfields[$i] } @disabled ){ + unless( $values[$i] ne q{} || $searches[$i] ne q{} || grep { $subfields[$i] } @disabled ){ splice(@values,$i,1); splice(@subfields,$i,1); splice(@tags,$i,1); splice(@searches,$i,1); splice(@replaces,$i,1); splice(@modifiers,$i,1); + $i--; # We made the arrays smaller - go back a step in interation } } -- 2.39.5