Skip to content

Commit

Permalink
Check saved skip bytes string is not ""
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Nov 13, 2015
1 parent f996556 commit 81f2281
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion check-log/check-log.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ func getBytesToSkip(f string) (int64, error) {
if err != nil {
return 0, err
}
i, err := strconv.ParseInt(strings.Trim(string(b), " \r\n"), 10, 64)
str := strings.Trim(string(b), " \r\n")
if str == "" {
return 0, nil
}
i, err := strconv.ParseInt(str, 10, 64)
if err != nil {
return 0, err
}
Expand Down

0 comments on commit 81f2281

Please sign in to comment.