X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/84a701a4f9f2e6f49bd78ccd9f2ba0370e841da9..57e47909ea593126a1055a5b077e7531c2fafb30:/PreferencesController.m diff --git a/PreferencesController.m b/PreferencesController.m index 962b7d8..0a796dc 100755 --- a/PreferencesController.m +++ b/PreferencesController.m @@ -184,11 +184,12 @@ static PreferencesController *prefs = nil; ITDebugLog(@"Audioscrobbler: Error getting keychain item password: %i", status); } else { NSLog(@"Audioscrobbler: password buffer: \"%s\" \"Length: %i\"", buffer, length); - pass = [[NSString alloc] initWithCharacters:(unichar *)buffer length:length]; + pass = [[NSString alloc] initWithBytes:buffer length:length encoding:NSUTF8StringEncoding]; } if (status != noErr) { ITDebugLog(@"Audioscrobbler: Error deleting keychain item: %i", status); } + SecKeychainItemFreeContent(NULL, buffer); CFRelease(item); } NSLog(@"Audioscrobbler: Retrieved password: \"%@\"", pass);