mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-06-01 09:20:17 +00:00
SDL_iconv_string: add (char*) casts before SDL_malloc() calls.
This commit is contained in:
parent
ceee7def84
commit
5f04ed5fbd
|
@ -888,7 +888,7 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
stringsize = inbytesleft > 4 ? inbytesleft : 4;
|
stringsize = inbytesleft > 4 ? inbytesleft : 4;
|
||||||
string = SDL_malloc(stringsize);
|
string = (char *) SDL_malloc(stringsize);
|
||||||
if (!string) {
|
if (!string) {
|
||||||
SDL_iconv_close(cd);
|
SDL_iconv_close(cd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -904,7 +904,7 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf,
|
||||||
{
|
{
|
||||||
char *oldstring = string;
|
char *oldstring = string;
|
||||||
stringsize *= 2;
|
stringsize *= 2;
|
||||||
string = SDL_realloc(string, stringsize);
|
string = (char *) SDL_realloc(string, stringsize);
|
||||||
if (!string) {
|
if (!string) {
|
||||||
SDL_iconv_close(cd);
|
SDL_iconv_close(cd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue