From 739b00be0d92e0df9650eb2ce4fbc49d7e3c0ce3 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 28 Jun 2020 11:32:27 +0200 Subject: [PATCH] fix --- msg.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)