diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index adb5441356..f308eb3759 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2786,14 +2786,13 @@ static int menu_displaylist_parse_database_entry(menu_handle_t *menu, if (entry->crc32) { - char *elem0 = NULL; char *save = NULL; char *entry_crc32_cpy = strdup(entry->crc32); const char *con = strtok_r(entry_crc32_cpy, "|", &save); if (con) { - elem0 = strdup(con); + char *elem0 = strdup(con); if ((con = strtok_r(NULL, "|", &save))) { switch (extension_to_file_hash_type(con)) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index d8f95d9f3a..6a94a4f3d8 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -3183,6 +3183,7 @@ static bool menu_shader_manager_operate_auto_preset( { if (!(BIT32_GET(flags.flags, shader_types_flags[j]))) continue; + strlcpy(end, video_shader_get_preset_extension(shader_types[j]), sizeof(preset_path) - (end - preset_path)); @@ -3227,7 +3228,7 @@ static bool menu_shader_manager_operate_auto_preset( for (j = 0; j < ARRAY_SIZE(shader_types); j++) { - if (!(BIT32_GET(flags.flags, shader_types[j]))) + if (!(BIT32_GET(flags.flags, shader_types_flags[j]))) continue; strlcpy(end, video_shader_get_preset_extension(shader_types[j]),