Skip to content

Commit

Permalink
Fix missing length in properties that was causing incorrect lenght in…
Browse files Browse the repository at this point in the history
… some tags
  • Loading branch information
alexbeltran committed Dec 22, 2017
1 parent 5b685e4 commit 8061309
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions encoding/readmultipleack.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (d *Decoder) objectsWithData(objects *[]bactype.Object) error {

// Tag 0 - Object ID
var expectedTag uint8
tag, meta, _ := d.tagNumberAndValue()
tag, meta, length := d.tagNumberAndValue()
objType, instance := d.objectId()

if tag != expectedTag {
Expand All @@ -126,7 +126,7 @@ func (d *Decoder) objectsWithData(objects *[]bactype.Object) error {
return &ErrorWrongTagType{OpeningTag}
}
// Tag 2 - Property Tag
tag, meta, length := d.tagNumberAndValue()
tag, meta, length = d.tagNumberAndValue()

for d.len() > 0 && tag == 2 && !meta.isClosing() {
expectedTag = 2
Expand Down Expand Up @@ -185,7 +185,7 @@ func (d *Decoder) objectsWithData(objects *[]bactype.Object) error {
return &ErrorWrongTagType{ClosingTag}
}

tag, meta = d.tagNumber()
tag, meta, length = d.tagNumberAndValue()
// Tag 5 - (Optional) Error Code
expectedTag = 5
if tag == expectedTag {
Expand Down

0 comments on commit 8061309

Please sign in to comment.