From f9131183fcf95f8ffefa513df7014df61fc9147d Mon Sep 17 00:00:00 2001 From: cos Date: Sun, 6 Dec 2015 22:39:32 +0100 Subject: Invalid servings count should still count. --- mat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mat b/mat index 2a2bff7..5407621 100755 --- a/mat +++ b/mat @@ -910,7 +910,7 @@ sub cmd_shoppinglist { my $servings_col = $db->selectcol_arrayref("SELECT servings FROM recipes WHERE id=".$recipe.";"); my $servings; - if(defined(@$servings_col[0])) { + if(defined(@$servings_col[0]) && (@$servings_col[0]) gt 0) { $servings = @$servings_col[0]; } else { $servings = 1; -- cgit v1.2.3