1
0
forked from zv0n/lunch-go

Fix Fresh parsing

This commit is contained in:
zv0n 2024-01-03 21:45:55 +01:00
parent 09ed5c108e
commit ff80a109e8

View File

@ -84,6 +84,9 @@ func (restaurant *FreshRestaurant) Parse() {
meals[curIndex] = append(meals[curIndex], line[10:]) meals[curIndex] = append(meals[curIndex], line[10:])
prices[curIndex] = append(prices[curIndex], -1) prices[curIndex] = append(prices[curIndex], -1)
} }
if curIndex < 0 {
curIndex++
}
if !pricesSection && line[1] == '.' && len(line) > 2 { if !pricesSection && line[1] == '.' && len(line) > 2 {
meals[curIndex] = append(meals[curIndex], line[3:]) meals[curIndex] = append(meals[curIndex], line[3:])
} }