From 07278140d93f12f98291cb817e9f283cd251c997 Mon Sep 17 00:00:00 2001 From: tidwall Date: Thu, 10 Dec 2020 08:54:47 -0700 Subject: [PATCH] Fixed expires out of range This commit fixes an issue where persisting a value with a negative expires to the AOF causes the database to not load. fixes #68 --- buntdb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buntdb.go b/buntdb.go index ca2152e..02708d9 100644 --- a/buntdb.go +++ b/buntdb.go @@ -861,7 +861,7 @@ func (db *DB) readLoad(rd io.Reader, modTime time.Time) error { if strings.ToLower(parts[3]) != "ex" { return ErrInvalid } - ex, err := strconv.ParseInt(parts[4], 10, 64) + ex, err := strconv.ParseUint(parts[4], 10, 64) if err != nil { return err }