From 000ea3096a6048d8a4392338f5450b5214cfd80e Mon Sep 17 00:00:00 2001 From: CTCaer Date: Sun, 26 Sep 2021 12:15:25 +0300 Subject: [PATCH] nyx: check if emuMMC path is null before producing the ID --- nyx/nyx_gui/frontend/fe_emummc_tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nyx/nyx_gui/frontend/fe_emummc_tools.c b/nyx/nyx_gui/frontend/fe_emummc_tools.c index ae9be6c..925d35d 100644 --- a/nyx/nyx_gui/frontend/fe_emummc_tools.c +++ b/nyx/nyx_gui/frontend/fe_emummc_tools.c @@ -113,7 +113,7 @@ void save_emummc_cfg(u32 part_idx, u32 sector_start, const char *path) // Get ID from path. u32 id_from_path = 0; - if (strlen(path) >= 4) + if (path && strlen(path) >= 4) memcpy(&id_from_path, path + strlen(path) - 4, 4); f_puts("\nid=0x", &fp); itoa(id_from_path, lbuf, 16);