commit 8728669764d059ab08e07111ca630f7fa313e51d
parent bfeed4a4f620d817f12f6f3d11043c06f1c53b80
Author: sin <sin@2f30.org>
Date: Wed, 1 May 2019 14:03:02 +0100
Use block descriptor type to select hash function in bscheck()
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bstorage.c b/bstorage.c
@@ -642,7 +642,7 @@ bscheck(struct bctx *bctx, unsigned char *md)
return -1;
}
- switch (sctx->type) {
+ switch (bd->type) {
case BD2BTYPE:
if (b2bhash(buf, bd->size, key.md) < 0) {
free(buf);