summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2015-12-06 22:39:32 +0100
committercos <cos>2016-07-17 20:10:58 +0200
commitf9131183fcf95f8ffefa513df7014df61fc9147d (patch)
treea9e30a7b0867c18d93daba2378ef9e5b8153ffcb
parentae8c9242c9dc0155a6e1c5ab9e0cf6bdc726e430 (diff)
downloadmat-f9131183fcf95f8ffefa513df7014df61fc9147d.zip
Invalid servings count should still count.
-rwxr-xr-xmat2
1 files changed, 1 insertions, 1 deletions
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;