From 31cd269ccce1119057d311c741b5036254cf4bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 8 Jul 2023 21:27:09 +0800 Subject: [PATCH] try to fix #9 --- structtable.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/structtable.go b/structtable.go index d544ddd..ec8468e 100644 --- a/structtable.go +++ b/structtable.go @@ -279,7 +279,11 @@ func (t *WTableWidth) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err case "w": t.W, err = strconv.ParseInt(attr.Value, 10, 64) if err != nil { - return + w, err := strconv.ParseFloat(attr.Value, 64) + if err != nil { + return err + } + t.W = int64(w) } case "type": t.Type = attr.Value