Small stack allocations fall back to malloc if they're unexpectedly large.
This commit is contained in:
parent
eedf2c965d
commit
b262b0ebc9
19 changed files with 84 additions and 52 deletions
|
@ -528,6 +528,7 @@ SDL_RWFromFile(const char *file, const char *mode)
|
|||
char *path;
|
||||
FILE *fp;
|
||||
|
||||
/* !!! FIXME: why not just "char path[PATH_MAX];" ? */
|
||||
path = SDL_stack_alloc(char, PATH_MAX);
|
||||
if (path) {
|
||||
SDL_snprintf(path, PATH_MAX, "%s/%s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue