mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 15:21:43 +00:00
Small stack allocations fall back to malloc if they're unexpectedly large.
This commit is contained in:
@@ -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",
|
||||
|
Reference in New Issue
Block a user