diff --git a/libretro.h b/libretro.h index 980323f024..fa309f831f 100755 --- a/libretro.h +++ b/libretro.h @@ -729,6 +729,7 @@ enum retro_mod * location-based information from the host device, * such as current latitude / longitude. */ +#define RETRO_ENVIRONMENT_GET_CONTENT_DIRECTORY 30 /* Old name, kept for compatibility. */ #define RETRO_ENVIRONMENT_GET_CORE_ASSETS_DIRECTORY 30 /* const char ** -- * Returns the "core assets" directory of the frontend. diff --git a/menu/menu_entries_cbs_deferred_push.c b/menu/menu_entries_cbs_deferred_push.c index 33d7ebecdf..a38c037844 100644 --- a/menu/menu_entries_cbs_deferred_push.c +++ b/menu/menu_entries_cbs_deferred_push.c @@ -227,12 +227,13 @@ int cb_core_updater_list(void *data_, size_t len) if (core_buf) free(core_buf); - core_buf = (char*)malloc(len * sizeof(char)); + core_buf = (char*)malloc((len+1) * sizeof(char)); if (!core_buf) return -1; memcpy(core_buf, data, len * sizeof(char)); + core_buf[len] = '\0'; core_len = len; menu->nonblocking_refresh = false;