rarch_init_core_options_path - NULL termination of strings is already

done outside by caller
This commit is contained in:
twinaphex 2021-05-17 00:56:29 +02:00
parent 095f6d4377
commit e6adca7679

View File

@ -36043,6 +36043,9 @@ static void runloop_task_msg_queue_push(
* - src_path: in the event that 'path' file does not
* yet exist, provides source path from which initial
* options should be extracted
*
* NOTE: caller must ensure
* path and src_path are NULL-terminated
* */
static void rarch_init_core_options_path(
struct rarch_state *p_rarch,
@ -36055,12 +36058,6 @@ static void rarch_init_core_options_path(
settings_t *settings = p_rarch->configuration_settings;
bool game_specific_options = settings->bools.game_specific_options;
/* Ensure that 'input' strings are null terminated */
if (len > 0)
path[0] = '\0';
if (src_len > 0)
src_path[0] = '\0';
/* Check whether game-specific options exist */
if (game_specific_options &&
rarch_game_specific_options(p_rarch, &game_options_path))
@ -36160,6 +36157,7 @@ static void rarch_init_core_options(
char options_path[PATH_MAX_LENGTH];
char src_options_path[PATH_MAX_LENGTH];
/* Ensure these are NULL-terminated */
options_path[0] = '\0';
src_options_path[0] = '\0';
@ -36503,6 +36501,7 @@ static void retroarch_init_core_variables(
char options_path[PATH_MAX_LENGTH];
char src_options_path[PATH_MAX_LENGTH];
/* Ensure these are NULL-terminated */
options_path[0] = '\0';
src_options_path[0] = '\0';