diff options
Diffstat (limited to 'Source/SPFieldEditorController.m')
-rw-r--r-- | Source/SPFieldEditorController.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m index 2f169ebd..12fcb6a5 100644 --- a/Source/SPFieldEditorController.m +++ b/Source/SPFieldEditorController.m @@ -271,7 +271,11 @@ case 2: // hex - load on demand if([sheetEditData length] && [[hexTextView string] isEqualToString:@""]) { [editSheetProgressBar startAnimation:self]; - [hexTextView setString:[sheetEditData dataToFormattedHexString]]; + if([sheetEditData isKindOfClass:[NSData class]]) { + [hexTextView setString:[sheetEditData dataToFormattedHexString]]; + } else { + [hexTextView setString:[[sheetEditData dataUsingEncoding:encoding allowLossyConversion:YES] dataToFormattedHexString]]; + } [editSheetProgressBar stopAnimation:self]; } [editTextView setHidden:YES]; @@ -561,7 +565,7 @@ } // set edit data to text - sheetEditData = [[editTextView string] retain]; + sheetEditData = [[NSString stringWithString:[editTextView string]] retain]; } |