diff --git a/extern/nfd-modified/src/nfd_cocoa.mm b/extern/nfd-modified/src/nfd_cocoa.mm index 929bad8dd..4e0f9e0bf 100644 --- a/extern/nfd-modified/src/nfd_cocoa.mm +++ b/extern/nfd-modified/src/nfd_cocoa.mm @@ -30,7 +30,8 @@ static NSArray *BuildAllowedFileTypes( const std::vector& filterLis // or this: NSString::stringWithUTF8String(typebuf); // buildFilterList->addObject(thisType); // really? did you have to make this mess?! - NSString *thisType = NSString::stringWithUTF8String(typebuf.c_str()); + const char* typebufC=typebuf.c_str(); + NSString *thisType = [NSString stringWithUTF8String:typebufC]; [buildFilterList addObject:thisType]; typebuf=""; } else if (j!='.' && j!='*') { @@ -39,7 +40,8 @@ static NSArray *BuildAllowedFileTypes( const std::vector& filterLis } if (!typebuf.empty()) { // I don't think this will work, but come on... - NSString *thisType = NSString::stringWithUTF8String(typebuf.c_str()); + const char* typebufC=typebuf.c_str(); + NSString *thisType = [NSString stringWithUTF8String:typebufC]; [buildFilterList addObject:thisType]; } }