File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,13 +77,14 @@ id process_plist(NSData *inputData)
7777 NSString *string = nil ;
7878
7979 // return if nil
80- if (inputData == NULL || inputData == nil )
80+ if (nil == inputData)
8181 {
8282 return nil ;
8383 }
8484
8585 // Initialize a string with the contents of the file.
86- string = [NSString stringWithUTF8String: (char *)[inputData bytes ]];
86+ string = AUTORELEASE ([[NSString alloc ] initWithData: inputData
87+ encoding: NSUTF8StringEncoding]);
8788
8889 // Convert the string into a property list. If there is a parsing error
8990 // the property list interpreter will throw an exception.
@@ -114,10 +115,6 @@ id process_plist(NSData *inputData)
114115
115116 // Read in the input from the file.
116117 inputData = [fileHandle readDataToEndOfFile ];
117- if ([inputData length ] == 0 )
118- {
119- return nil ;
120- }
121118 }
122119 else
123120 {
You can’t perform that action at this time.
0 commit comments