diff --git a/src/mac/getself.m b/src/mac/getself.m index 16ac964489fecd9bd6c29a329f08fca7082fce63..33d065338a491deb67d16771e16c491f05ab21ca 100644 --- a/src/mac/getself.m +++ b/src/mac/getself.m @@ -6,10 +6,7 @@ const char *get_self_executable(int argc, char **argv) if(!cstr) { - NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; - resourcePath = [NSString stringWithFormat:@"%@/", resourcePath]; - const char *utf8 = [resourcePath UTF8String]; - + const char *utf8 = [[[NSBundle mainBundle] resourcePath] UTF8String]; cstr = malloc(strlen(utf8) + 1); strcpy(cstr, utf8); }