mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
committed by
Bjørn Erik Pedersen
parent
e2d66e3218
commit
6dbbe6dd3a
@@ -17,6 +17,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"math"
|
||||||
"math/big"
|
"math/big"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -140,6 +141,12 @@ func (d *Decoder) Decode(r io.Reader) (ex *ExifInfo, err error) {
|
|||||||
|
|
||||||
if !d.noLatLong {
|
if !d.noLatLong {
|
||||||
lat, long, _ = x.LatLong()
|
lat, long, _ = x.LatLong()
|
||||||
|
if math.IsNaN(lat) {
|
||||||
|
lat = 0
|
||||||
|
}
|
||||||
|
if math.IsNaN(long) {
|
||||||
|
long = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
walker := &exifWalker{x: x, vals: make(map[string]any), includeMatcher: d.includeFieldsRe, excludeMatcher: d.excludeFieldsrRe}
|
walker := &exifWalker{x: x, vals: make(map[string]any), includeMatcher: d.includeFieldsRe, excludeMatcher: d.excludeFieldsrRe}
|
||||||
|
Reference in New Issue
Block a user