Merge branch 'master' of oss.readytalk.com:/var/local/git/avian

This commit is contained in:
Joel Dice 2010-04-27 08:38:16 -06:00
commit d236a3b78c

View File

@ -93,6 +93,8 @@ pathOfExecutable(System* s, const char** retBuf, unsigned* size)
CFBundleRef bundle = CFBundleGetMainBundle();
CFURLRef url = CFBundleCopyExecutableURL(bundle);
CFStringRef path = CFURLCopyPath(url);
path = CFURLCreateStringByReplacingPercentEscapes(kCFAllocatorDefault,
path, CFSTR(""));
CFIndex pathSize = CFStringGetMaximumSizeOfFileSystemRepresentation(path);
char* buffer = reinterpret_cast<char*>(allocate(s, pathSize));
if (CFStringGetFileSystemRepresentation(path, buffer, pathSize)) {