src/filesystem/cocoa/SDL_sysfilesystem.m
changeset 7883 62f562a475e1
parent 7866 42da269b7977
child 7891 b34f5e226458
     1.1 --- a/src/filesystem/cocoa/SDL_sysfilesystem.m	Tue Oct 22 21:54:52 2013 -0700
     1.2 +++ b/src/filesystem/cocoa/SDL_sysfilesystem.m	Wed Oct 23 00:58:20 2013 -0400
     1.3 @@ -73,19 +73,17 @@
     1.4      NSArray *array = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
     1.5      char *retval = NULL;
     1.6  
     1.7 -    (void) org;  /* unused on Mac OS X and iOS. */
     1.8 -
     1.9      if ([array count] > 0) {  /* we only want the first item in the list. */
    1.10          NSString *str = [array objectAtIndex:0];
    1.11          const char *base = [str fileSystemRepresentation];
    1.12          if (base) {
    1.13 -            const size_t len = SDL_strlen(base) + SDL_strlen(app) + 3;
    1.14 +            const size_t len = SDL_strlen(base) + SDL_strlen(app) + 4;
    1.15              retval = (char *) SDL_malloc(len);
    1.16              if (retval == NULL) {
    1.17                  SDL_OutOfMemory();
    1.18              } else {
    1.19                  char *ptr;
    1.20 -                SDL_snprintf(retval, len, "%s/%s/", base, app);
    1.21 +                SDL_snprintf(retval, len, "%s/%s/%s/", base, org, app);
    1.22                  for (ptr = retval+1; *ptr; ptr++) {
    1.23                      if (*ptr == '/') {
    1.24                          *ptr = '\0';