From 9dc611bbbf05ff700654f636f7150b91146d6c9f Mon Sep 17 00:00:00 2001 From: jakcron Date: Sun, 20 Mar 2016 11:34:50 +0800 Subject: [PATCH] Fix CIA content hash validation fail. --- ctrtool/tmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctrtool/tmd.c b/ctrtool/tmd.c index bcb687f..95d2327 100644 --- a/ctrtool/tmd.c +++ b/ctrtool/tmd.c @@ -169,7 +169,7 @@ void tmd_print(tmd_context* ctx) fprintf(stdout, "\n"); fprintf(stdout, "Content size: %016"PRIx64"\n", getbe64(chunk->size)); - switch(ctx->content_hash_stat[getbe16(chunk->index)]) { + switch(ctx->content_hash_stat[i]) { case 1: memdump(stdout, "Content hash [OK]: ", chunk->hash, 32); break; case 2: memdump(stdout, "Content hash [FAIL]: ", chunk->hash, 32); break; default: memdump(stdout, "Content hash: ", chunk->hash, 32); break;