summary refs log tree commit diff
path: root/pkgs/tools/compression/hactool/musl-compat.patch
blob: 37d596f183fb1f6725a2d51759758fd488de4eed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/main.c b/main.c
index 07f53cb..f2265df 100644
--- a/main.c
+++ b/main.c
@@ -369,7 +369,7 @@ int main(int argc, char **argv) {
                     return EXIT_FAILURE;
                 }
                 nca_ctx.tool_ctx->base_file_type = BASEFILE_FAKE;
-                nca_ctx.tool_ctx->base_file++; /* Guarantees base_file != NULL. I'm so sorry. */
+                if (!nca_ctx.tool_ctx->base_file) nca_ctx.tool_ctx->base_file = (FILE*) 1;
                 break;
             case 32:
                 tool_ctx.action |= ACTION_ONLYUPDATEDROMFS;