From 1fcd3afc38ebc7ee98add0bf1b4bd643b25ccebf Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 2 Jun 2020 20:35:17 +0000 Subject: [PATCH] Fix hashes --- src/libutil/hash.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc index 0c3de2fda..6b9effdd2 100644 --- a/src/libutil/hash.cc +++ b/src/libutil/hash.cc @@ -19,13 +19,13 @@ namespace nix { void Hash::init() { - if (!type) abort(); - switch (*type) { + if (!type) abort(); + switch (*type) { case HashType::MD5: hashSize = md5HashSize; break; case HashType::SHA1: hashSize = sha1HashSize; break; case HashType::SHA256: hashSize = sha256HashSize; break; case HashType::SHA512: hashSize = sha512HashSize; break; - } + } assert(hashSize <= maxHashSize); memset(hash, 0, maxHashSize); }