From 21bdf835d9372371864bcf4a2e95c7fe03525829 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Fri, 29 Aug 2014 14:18:22 +0200 Subject: [PATCH] Apply the same fix to another part of the code. --- settings_data.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/settings_data.c b/settings_data.c index 0e3614f3a3..2e5567982d 100644 --- a/settings_data.c +++ b/settings_data.c @@ -1904,7 +1904,9 @@ rarch_setting_t *setting_data_get_mainmenu(bool regenerate) APPEND(terminator); /* flatten this array to save ourselves some kilobytes */ - return (rarch_setting_t*)realloc(list, sizeof(rarch_setting_t) * index); + list=realloc(list, sizeof(rarch_setting_t) * index); + /* do not optimize into return realloc(), list is static and must be written */ + return (rarch_setting_t*)list; } #endif @@ -2255,5 +2257,6 @@ rarch_setting_t *setting_data_get_list(void) /* flatten this array to save ourselves some kilobytes */ list=realloc(list, sizeof(rarch_setting_t) * index); + /* do not optimize into return realloc(), list is static and must be written */ return (rarch_setting_t*)list; }