diff --git a/configuration.c b/configuration.c index b1bdd94b3b..a1eaecda86 100644 --- a/configuration.c +++ b/configuration.c @@ -1283,7 +1283,9 @@ static void config_set_defaults(void) if (!string_is_empty(g_defaults.dir.osk_overlay)) { - char temp_path[PATH_MAX_LENGTH] = {0}; + char temp_path[PATH_MAX_LENGTH]; + + temp_path[0] = '\0'; fill_pathname_expand_special(temp_path, g_defaults.dir.osk_overlay, sizeof(temp_path)); @@ -1299,7 +1301,9 @@ static void config_set_defaults(void) } else { - char temp_path[PATH_MAX_LENGTH] = {0}; + char temp_path[PATH_MAX_LENGTH]; + + temp_path[0] = '\0'; strlcpy(temp_path, settings->directory.overlay, @@ -1708,10 +1712,10 @@ static bool config_load_file(const char *path, bool set_defaults, settings_t *settings) { unsigned i; + char tmp_str[PATH_MAX_LENGTH]; bool ret = false; bool tmp_bool = false; char *save = NULL; - char tmp_str[PATH_MAX_LENGTH]; unsigned msg_color = 0; config_file_t *conf = NULL; struct config_int_setting *int_settings = NULL; @@ -2265,7 +2269,9 @@ bool config_load_override(void) /* If a game override exists, add it's location to append_config_path */ if (new_conf) { - char temp_path[PATH_MAX_LENGTH] = {0}; + char temp_path[PATH_MAX_LENGTH]; + + temp_path[0] = '\0'; config_file_free(new_conf); diff --git a/list_special.c b/list_special.c index 97a0268c9a..235f77ff96 100644 --- a/list_special.c +++ b/list_special.c @@ -55,8 +55,8 @@ struct string_list *dir_list_new_special(const char *input_dir, enum dir_list_type type, const char *filter) { - char ext_shaders[PATH_MAX_LENGTH]; - char ext_name[PATH_MAX_LENGTH]; + char ext_shaders[255]; + char ext_name[255]; const char *dir = NULL; const char *exts = NULL; bool include_dirs = false; diff --git a/playlist.c b/playlist.c index a3f2c80efe..530296a7da 100644 --- a/playlist.c +++ b/playlist.c @@ -247,7 +247,7 @@ bool playlist_push(playlist_t *playlist, { if (string_is_empty(core_name) && !string_is_empty(core_path)) { - static char base_path[PATH_MAX_LENGTH] = {0}; + static char base_path[255] = {0}; fill_pathname_base_noext(base_path, core_path, sizeof(base_path)); core_name = base_path; RARCH_LOG("core_name is now: %s\n", core_name); diff --git a/retroarch.c b/retroarch.c index 2a4a048b46..4419814b05 100644 --- a/retroarch.c +++ b/retroarch.c @@ -228,7 +228,7 @@ static void retroarch_print_features(void) static void retroarch_print_version(void) { - char str[PATH_MAX_LENGTH]; + char str[255]; str[0] = '\0'; @@ -1026,7 +1026,7 @@ bool retroarch_main_init(int argc, char *argv[]) if (verbosity_is_enabled()) { - char str[PATH_MAX_LENGTH]; + char str[255]; str[0] = '\0'; diff --git a/runloop.c b/runloop.c index 491b23c66f..67fa0d2fb0 100644 --- a/runloop.c +++ b/runloop.c @@ -237,7 +237,7 @@ static bool runloop_cmd_get_state_menu_toggle_button_combo( **/ static bool rarch_game_specific_options(char **output) { - char game_path[PATH_MAX_LENGTH]; + char game_path[255]; game_path[0] ='\0';