mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 07:28:30 +00:00
filesystem: SDL_EnumerateDirectory should return -1 or 0.
The callback requesting a non-error stop should not return a special value.
This commit is contained in:
@@ -56,7 +56,7 @@ int SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback call
|
||||
} else if (!callback) {
|
||||
return SDL_InvalidParamError("callback");
|
||||
}
|
||||
return SDL_SYS_EnumerateDirectory(path, path, callback, userdata);
|
||||
return (SDL_SYS_EnumerateDirectory(path, path, callback, userdata) < 0) ? -1 : 0;
|
||||
}
|
||||
|
||||
int SDL_GetPathInfo(const char *path, SDL_PathInfo *info)
|
||||
|
Reference in New Issue
Block a user