Skip to content

Commit

Permalink
create dlError message from CString without formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
CKegel committed Apr 18, 2023
1 parent a7f4ffc commit 4e2a6ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NSURL.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static void posixError(CFErrorRef *error) {
static void dlError(CFErrorRef *error) {
int saved_errno = errno;
const CFStringRef key = kCFErrorUnderlyingErrorKey;
CFStringRef underlyingError = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%s"), dlerror());
CFStringRef underlyingError = CFStringCreateWithCString(kCFAllocatorDefault, dlerror(), kCFStringEncodingUTF8);
CFTypeRef value = underlyingError;

if(error != NULL)
Expand Down

0 comments on commit 4e2a6ad

Please sign in to comment.