From f7a568a1f68437311649595c50bc17d332536f82 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 4 Sep 2009 13:42:09 +0200 Subject: [PATCH] =?utf8?q?M=C3=B6glicher=20Division=20by=20zero=20abgefang?= =?utf8?q?en.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix für Bug 1051. --- bin/mozilla/io.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 7d2494324..25427f71d 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -262,7 +262,7 @@ sub display_row { if ($form->{"id_$i"}) { my $ship_qty = $form->{"ship_$i"} * 1; $ship_qty *= $all_units->{$form->{"partunit_$i"}}->{factor}; - $ship_qty /= $all_units->{$form->{"unit_$i"}}->{factor}; + $ship_qty /= ( $all_units->{$form->{"unit_$i"}}->{factor} || 1 ); $column_data{ship} = $form->format_amount(\%myconfig, $form->round_amount($ship_qty, 2) * 1) . ' ' . $form->{"unit_$i"}; } -- 2.20.1