Merge PR #3745: Return on zero-length byte array input

This commit is contained in:
Christopher Goes
2019-02-26 14:54:47 +01:00
committed by GitHub
parent 6ace1fada2
commit b86afd8d0b
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ func DiffKVStores(a KVStore, b KVStore, prefixesToSkip [][]byte) (kvA cmn.KVPair
// range query for all []byte with a certain prefix
// Deals with last byte of prefix being FF without overflowing
func PrefixEndBytes(prefix []byte) []byte {
if prefix == nil {
if len(prefix) == 0 {
return nil
}