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
This commit is contained in:
tidwall 2020-12-10 08:54:47 -07:00
parent 18423895fc
commit 07278140d9
1 changed files with 1 additions and 1 deletions

View File

@ -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
}