From d31511c9d41ec475e453c1b359bfb3efbb040c73 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Tue, 22 Jun 2010 15:21:26 +0200 Subject: [PATCH] TestDisk: fix HFSP detection Regression introduced in commit 183a66798e1ddbfd62c56e1d34287fddb0a4d3e7 --- src/analyse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/analyse.c b/src/analyse.c index 79490d03..b55143fe 100644 --- a/src/analyse.c +++ b/src/analyse.c @@ -84,7 +84,7 @@ int search_HFS_backup(unsigned char *buffer, disk_t *disk, partition_t *partitio strncpy(partition->info,"HFS found using backup sector!",sizeof(partition->info)); return 1; } - if((be32(vh->version)==4 || be32(vh->version)==5) && + if((be16(vh->version)==4 || be16(vh->version)==5) && recover_HFSP(disk, vh, partition, verbose, dump_ind, 1)==0) { strncpy(partition->info,"HFS+ found using backup sector!",sizeof(partition->info)); @@ -258,7 +258,7 @@ int search_type_2(unsigned char *buffer, disk_t *disk,partition_t *partition,con if(hfs_mdb->drSigWord==be16(HFS_SUPER_MAGIC) && recover_HFS(disk, hfs_mdb, partition, verbose, dump_ind, 0)==0) return 1; - if((be32(vh->version)==4 || be32(vh->version)==5) && + if((be16(vh->version)==4 || be16(vh->version)==5) && recover_HFSP(disk, vh, partition, verbose, dump_ind, 0)==0) return 1; return 0;