fix: fix bug of CheckVersionChecksum

v4
Seer 2 years ago committed by suxb201
parent d0d4f42459
commit f23302dbbf
  1. 7
      src/redis-shake/common/common.go

@ -10,11 +10,12 @@ import (
"unsafe"
"github.com/alibaba/RedisShake/pkg/libs/bytesize"
"github.com/alibaba/RedisShake/redis-shake/configure"
conf "github.com/alibaba/RedisShake/redis-shake/configure"
"strconv"
"github.com/cupcake/rdb/crc64"
logRotate "gopkg.in/natefinch/lumberjack.v2"
"strconv"
)
const (
@ -139,7 +140,7 @@ func CheckVersionChecksum(d []byte) (uint, uint64, error) {
}
footer := length - 10
rdbVersion := uint((d[footer+1] << 8) | d[footer])
rdbVersion := (uint(d[footer+1]) << 8) | uint(d[footer])
if rdbVersion > RDBVersion {
return 0, 0, fmt.Errorf("current version[%v] > RDBVersion[%v]", rdbVersion, RDBVersion)
}

Loading…
Cancel
Save