From 6bbe964f42ba9781574afd1b204f95b9a168f0ba Mon Sep 17 00:00:00 2001 From: Pablo Curiel Date: Thu, 25 May 2023 04:15:58 +0200 Subject: [PATCH] nca: fix layer hash calculation. Long standing issue since 1bc1a05f9658a17c5d37ea4ebf58ae2e1a64ba1c. I feel extra stupid. It must be the date or something, I don't know. At least I'm getting to fix lots of silly issues within the codebase. Emphasis on "silly" -- I wouldn't have liked to rework the hierarchical patch generation algorithm. Big thanks to @KookiesGH for notifying about the NSP installation issues with Goldleaf on the Discord server. --- source/core/nca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/nca.c b/source/core/nca.c index 6697b84..519a7cd 100644 --- a/source/core/nca.c +++ b/source/core/nca.c @@ -1405,9 +1405,9 @@ static void ncaCalculateLayerHash(void *dst, const void *src, size_t size, bool { if (use_sha3) { - sha256CalculateHash(dst, src, size); - } else { sha3256CalculateHash(dst, src, size); + } else { + sha256CalculateHash(dst, src, size); } }