Fix bug parsing default timestamps with modified precision (#2949)

This commit is contained in:
Daniel Nelson
2017-06-23 10:59:04 -07:00
committed by GitHub
parent 82a04d904d
commit 9276318faf
2 changed files with 16 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ func parseMetric(buf []byte,
// apply precision multiplier
var nsec int64
multiplier := getPrecisionMultiplier(precision)
if multiplier > 1 {
if len(ts) > 0 && multiplier > 1 {
tsint, err := parseIntBytes(ts, 10, 64)
if err != nil {
return nil, err