src/platform_unix.c
changeset 1002 001380a457a0
parent 1001 b0c6f2f4f361
child 1003 a28d30d275e2
equal deleted inserted replaced
1001:b0c6f2f4f361 1002:001380a457a0
   259         BAIL_IF_MACRO(!envr, NULL, NULL);
   259         BAIL_IF_MACRO(!envr, NULL, NULL);
   260         retval = findBinaryInPath(argv0, envr);
   260         retval = findBinaryInPath(argv0, envr);
   261         allocator.Free(envr);
   261         allocator.Free(envr);
   262     } /* if */
   262     } /* if */
   263 
   263 
       
   264     if (retval != NULL)
       
   265     {
       
   266         /* try to shrink buffer... */
       
   267         char *ptr = (char *) allocator.Realloc(retval, strlen(retval) + 1);
       
   268         if (ptr != NULL)
       
   269             retval = ptr;  /* oh well if it failed. */
       
   270     } /* if */
       
   271 
   264     return(retval);
   272     return(retval);
   265 } /* __PHYSFS_platformCalcBaseDir */
   273 } /* __PHYSFS_platformCalcBaseDir */
   266 
   274 
   267 
   275 
   268 char *__PHYSFS_platformRealPath(const char *path)
   276 char *__PHYSFS_platformRealPath(const char *path)