mirror of https://github.com/perkeep/perkeep.git
Merge "vendor: update github.com/rwcarlsen/goexif"
This commit is contained in:
commit
f7a98b698c
|
@ -263,7 +263,7 @@
|
|||
"exif",
|
||||
"tiff"
|
||||
]
|
||||
revision = "fb35d3c3290d09f3524b684b5d42d0063c227158"
|
||||
revision = "8d986c03457a2057c7b0fb0a48113f7dd48f9619"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
@ -349,7 +349,6 @@
|
|||
"curve25519",
|
||||
"ed25519",
|
||||
"ed25519/internal/edwards25519",
|
||||
"internal/chacha20",
|
||||
"nacl/secretbox",
|
||||
"openpgp",
|
||||
"openpgp/armor",
|
||||
|
|
|
@ -179,8 +179,15 @@ func (t *Tag) convertVals() error {
|
|||
|
||||
switch t.Type {
|
||||
case DTAscii:
|
||||
if len(t.Val) > 0 {
|
||||
t.strVal = string(t.Val[:len(t.Val)-1]) // ignore the last byte (NULL).
|
||||
if len(t.Val) <= 0 {
|
||||
break
|
||||
}
|
||||
nullPos := bytes.IndexByte(t.Val, 0)
|
||||
if nullPos == -1 {
|
||||
t.strVal = string(t.Val)
|
||||
} else {
|
||||
// ignore all trailing NULL bytes, in case of a broken t.Count
|
||||
t.strVal = string(t.Val[:nullPos])
|
||||
}
|
||||
case DTByte:
|
||||
var v uint8
|
||||
|
|
Loading…
Reference in New Issue