From 3b5755fc28fc88ada8a9bc6ff7dcc79c4707cfa0 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Mon, 19 Mar 2018 01:11:48 +0100 Subject: [PATCH] seedDB building: detect empty seeddb --- arm9/source/utils/gameutil.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arm9/source/utils/gameutil.c b/arm9/source/utils/gameutil.c index 2cf3d01..dc55470 100644 --- a/arm9/source/utils/gameutil.c +++ b/arm9/source/utils/gameutil.c @@ -2085,17 +2085,19 @@ u32 BuildSeedInfo(const char* path, bool dump) { if (dump) { u32 dump_size = SEEDDB_SIZE(seed_info); + u32 ret = 0; if (dump_size > 16) { if (fvx_rmkdir(OUTPUT_PATH) != FR_OK) // ensure the output dir exists - return 1; + ret = 1; f_unlink(path_out); if (fvx_qwrite(path_out, seed_info, 0, dump_size, NULL) != FR_OK) - return 1; - } + ret = 1; + } else ret = 1; free(seed_info); seed_info = NULL; + return ret; } return 0;