From d3f96c348adff7532068378da1212d15fec1f196 Mon Sep 17 00:00:00 2001 From: Julian Daube Date: Mon, 20 Mar 2017 11:54:08 +0100 Subject: [PATCH] fixed small bug which cut away the last digit of the price --- part.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/part.go b/part.go index 24b333f..e090686 100644 --- a/part.go +++ b/part.go @@ -104,7 +104,7 @@ func (c *Connection) GetPrice(p Part) float32 { // need to convert german decimals (using ,) to american decimals // using . - str := strings.Replace(price[:i-1], ",", ".", 1) + str := strings.Replace(price[:i], ",", ".", 1) ret, _ := strconv.ParseFloat(str, 32) return float32(ret) }