From 24149b905b4c031dc3d439d6e446ecc007d61d6e Mon Sep 17 00:00:00 2001 From: jove Date: Thu, 8 Dec 2016 14:03:13 +0800 Subject: [PATCH] fix attribute value parse error --- parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser.go b/parser.go index f57f4a4..fe734e2 100644 --- a/parser.go +++ b/parser.go @@ -277,7 +277,7 @@ func (parser *Parser) parseAttribute() *Attribute { attr := new(Attribute) attr.Name = parser.getString(attrNameIdx) - if int64(attrNSIdx) == 0xFFFFFFFF { + if uint32(attrNSIdx) == 0xFFFFFFFF { attr.Namespace = "" attr.Prefix = "" } else { @@ -288,7 +288,7 @@ func (parser *Parser) parseAttribute() *Attribute { } } - if int64(attrValueIdx) == 0xFFFFFFFF { + if uint32(attrValueIdx) == 0xFFFFFFFF { attr.Value = parser.getAttributeValue(attrType, attrData) } else { attr.Value = parser.getString(attrValueIdx)