Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions v3/undefined/exif_A301_scene_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ func (CodecExifA301SceneType) Decode(valueContext *exifcommon.ValueContext) (val
}
}()

valueContext.SetUndefinedValueType(exifcommon.TypeLong)
valueContext.SetUndefinedValueType(exifcommon.TypeByte)

valueLongs, err := valueContext.ReadLongs()
valueBytes, err := valueContext.ReadBytes()
log.PanicIf(err)

return TagExifA301SceneType(valueLongs[0]), nil
return TagExifA301SceneType(valueBytes[0]), nil
}

func init() {
Expand Down
4 changes: 2 additions & 2 deletions v3/undefined/exif_A301_scene_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func TestCodecExifA301SceneType_Encode(t *testing.T) {
}

func TestCodecExifA301SceneType_Decode(t *testing.T) {
expectedUt := TagExifA301SceneType(0x1234)
expectedUt := TagExifA301SceneType(0x01)

encoded := []byte{0, 0, 0x12, 0x34}
encoded := []byte{0x01}

rawValueOffset := encoded

Expand Down