mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 15:10:49 +00:00
SDL_GlobDirectory(): Don't chop off first slash from path, if it's just multiple slashes
This commit is contained in:
parent
d0a7290689
commit
961a04fa26
1 changed files with 1 additions and 1 deletions
|
|
@ -380,7 +380,7 @@ char **SDL_InternalGlobDirectory(const char *path, const char *pattern, SDL_Glob
|
|||
return NULL;
|
||||
}
|
||||
char *ptr = &pathcpy[pathlen-1];
|
||||
while ((ptr >= pathcpy) && ((*ptr == '/') || (*ptr == '\\'))) {
|
||||
while ((ptr > pathcpy) && ((*ptr == '/') || (*ptr == '\\'))) {
|
||||
*(ptr--) = '\0';
|
||||
}
|
||||
path = pathcpy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue