mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 07:20:34 +00:00
task_pl_thumbnail_download.c - put char string of 8192 length
on heap for all platforms
This commit is contained in:
parent
ba7900a3fb
commit
cc8160d044
@ -89,11 +89,7 @@ static bool get_thumbnail_paths(
|
|||||||
char *path, size_t path_size,
|
char *path, size_t path_size,
|
||||||
char *url, size_t url_size)
|
char *url, size_t url_size)
|
||||||
{
|
{
|
||||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
|
||||||
char *raw_url;
|
char *raw_url;
|
||||||
#else
|
|
||||||
char raw_url[8192];
|
|
||||||
#endif
|
|
||||||
char content_dir[PATH_MAX_LENGTH];
|
char content_dir[PATH_MAX_LENGTH];
|
||||||
char tmp_buf[PATH_MAX_LENGTH];
|
char tmp_buf[PATH_MAX_LENGTH];
|
||||||
const char *system = NULL;
|
const char *system = NULL;
|
||||||
@ -153,12 +149,10 @@ static bool get_thumbnail_paths(
|
|||||||
if (string_is_empty(path))
|
if (string_is_empty(path))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
|
||||||
raw_url = (char*)malloc(8192 * sizeof(char));
|
raw_url = (char*)malloc(8192 * sizeof(char));
|
||||||
|
|
||||||
if (!raw_url)
|
if (!raw_url)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
|
||||||
raw_url[0] = '\0';
|
raw_url[0] = '\0';
|
||||||
|
|
||||||
/* Generate remote path */
|
/* Generate remote path */
|
||||||
@ -170,19 +164,13 @@ static bool get_thumbnail_paths(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (string_is_empty(raw_url))
|
if (string_is_empty(raw_url))
|
||||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
|
||||||
{
|
{
|
||||||
free(raw_url);
|
free(raw_url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
net_http_urlencode_full(url, raw_url, url_size);
|
net_http_urlencode_full(url, raw_url, url_size);
|
||||||
#if defined(__PSL1GHT__) || defined(__PS3__)
|
|
||||||
free(raw_url);
|
free(raw_url);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (string_is_empty(url))
|
if (string_is_empty(url))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user