From 7f05f5e6b0d2fa5f44f062959d2c07d0cd99bb6c Mon Sep 17 00:00:00 2001 From: Kory Prince Date: Mon, 27 Jul 2020 16:03:43 -0500 Subject: [PATCH] use int32 instead of int when parsing --- attribute.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/attribute.go b/attribute.go index 0792efe..005b6f8 100644 --- a/attribute.go +++ b/attribute.go @@ -351,8 +351,8 @@ type Attribute struct { // Resolution defines the resolution attribute type Resolution struct { - Height int - Width int + Height int32 + Width int32 Depth int8 } @@ -480,7 +480,7 @@ func (d *AttributeDecoder) decodeDate() ([]int, error) { return is, nil } -func (d *AttributeDecoder) decodeRange() ([]int, error) { +func (d *AttributeDecoder) decodeRange() ([]int32, error) { length, err := d.readValueLength() if err != nil { return nil, err @@ -488,10 +488,10 @@ func (d *AttributeDecoder) decodeRange() ([]int, error) { // initialize range element count (c) and range slice (r) c := length / 4 - r := make([]int, c) + r := make([]int32, c) for i := int16(0); i < c; i++ { - var ti int + var ti int32 if err = binary.Read(d.reader, binary.BigEndian, &ti); err != nil { return nil, err }