From 3c91ce8d6b6fc914c83c0b3c5379cecae75babcc Mon Sep 17 00:00:00 2001 From: thedax Date: Mon, 8 Oct 2018 12:10:55 -0400 Subject: [PATCH] Nacptool: fix bug with title id parsing on Windows. (#19) * Fix bug with title id parsing on Windows. On Windows, longs (as specified by %lX) are 32-bit, not 64-bit, so assuming its size results in the upper 32-bits of the title id being lost. * Use SCNx64 instead. --- src/nacptool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nacptool.c b/src/nacptool.c index d8985ad..09c4f01 100644 --- a/src/nacptool.c +++ b/src/nacptool.c @@ -2,6 +2,7 @@ #include #include #include +#include typedef uint64_t u64; typedef uint32_t u32; @@ -79,7 +80,7 @@ int main(int argc, char* argv[]) { int argi; u64 titleid=0; for (argi=6; argi