mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
rarch_init_core_options_path - NULL termination of strings is already
done outside by caller
This commit is contained in:
parent
095f6d4377
commit
e6adca7679
11
retroarch.c
11
retroarch.c
@ -36043,6 +36043,9 @@ static void runloop_task_msg_queue_push(
|
|||||||
* - src_path: in the event that 'path' file does not
|
* - src_path: in the event that 'path' file does not
|
||||||
* yet exist, provides source path from which initial
|
* yet exist, provides source path from which initial
|
||||||
* options should be extracted
|
* options should be extracted
|
||||||
|
*
|
||||||
|
* NOTE: caller must ensure
|
||||||
|
* path and src_path are NULL-terminated
|
||||||
* */
|
* */
|
||||||
static void rarch_init_core_options_path(
|
static void rarch_init_core_options_path(
|
||||||
struct rarch_state *p_rarch,
|
struct rarch_state *p_rarch,
|
||||||
@ -36055,12 +36058,6 @@ static void rarch_init_core_options_path(
|
|||||||
settings_t *settings = p_rarch->configuration_settings;
|
settings_t *settings = p_rarch->configuration_settings;
|
||||||
bool game_specific_options = settings->bools.game_specific_options;
|
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 */
|
/* Check whether game-specific options exist */
|
||||||
if (game_specific_options &&
|
if (game_specific_options &&
|
||||||
rarch_game_specific_options(p_rarch, &game_options_path))
|
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 options_path[PATH_MAX_LENGTH];
|
||||||
char src_options_path[PATH_MAX_LENGTH];
|
char src_options_path[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
/* Ensure these are NULL-terminated */
|
||||||
options_path[0] = '\0';
|
options_path[0] = '\0';
|
||||||
src_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 options_path[PATH_MAX_LENGTH];
|
||||||
char src_options_path[PATH_MAX_LENGTH];
|
char src_options_path[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
/* Ensure these are NULL-terminated */
|
||||||
options_path[0] = '\0';
|
options_path[0] = '\0';
|
||||||
src_options_path[0] = '\0';
|
src_options_path[0] = '\0';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user