Skip to content

Commit

Permalink
Fixes #157
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnsth committed May 20, 2018
1 parent db0d78a commit 3b89a0b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pdf/core/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ func (parser *PdfParser) parseNumber() (PdfObject, error) {

if isFloat {
fVal, err := strconv.ParseFloat(r.String(), 64)
if err != nil {
common.Log.Debug("Error parsing number %v err=%v. Using 0.0. Output may be incorrect", r.String(), err)
fVal = 0.0
err = nil
}
o := PdfObjectFloat(fVal)
return &o, err
} else {
Expand Down

0 comments on commit 3b89a0b

Please sign in to comment.