From ff80a109e8225eb19a1f589435f03df330e4b563 Mon Sep 17 00:00:00 2001 From: zv0n Date: Wed, 3 Jan 2024 21:45:55 +0100 Subject: [PATCH] Fix Fresh parsing --- pkg/restaurants/fresh.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/restaurants/fresh.go b/pkg/restaurants/fresh.go index dc0230b..4d5dc0e 100644 --- a/pkg/restaurants/fresh.go +++ b/pkg/restaurants/fresh.go @@ -84,6 +84,9 @@ func (restaurant *FreshRestaurant) Parse() { meals[curIndex] = append(meals[curIndex], line[10:]) prices[curIndex] = append(prices[curIndex], -1) } + if curIndex < 0 { + curIndex++ + } if !pricesSection && line[1] == '.' && len(line) > 2 { meals[curIndex] = append(meals[curIndex], line[3:]) }