diff --git a/msg.go b/msg.go index 861dcb6..82c2968 100644 --- a/msg.go +++ b/msg.go @@ -356,7 +356,9 @@ func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha Name: l[2], ItemID64: i, Quantity: q, - Quality: rq.ReplaceAllString(l[1], "${Quality}"), + } + if rq.MatchString(l[1]) { + item.Quality = rq.ReplaceAllString(l[1], "${Quality}") } log.Printf("Item : %s - %s : %s\n", item.Code, item.Name, item.Quality) stock = append(stock, item)