Skip to content

Commit

Permalink
Ignores all unknown characters
Browse files Browse the repository at this point in the history
  • Loading branch information
torinkwok committed Apr 1, 2015
1 parent 4e0957e commit 044dd93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions INAppStoreWindow/INAppStoreWindow.m
Expand Up @@ -153,15 +153,17 @@ + (NSColor *)windowPatternOverlayColor

// initWithBase64EncodedString:options: is available in OS X v10.9 and later
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_9
rep = [[NSBitmapImageRep alloc] initWithData:[[NSData alloc] initWithBase64EncodedString: INWindowBackgroundPatternOverlayLayer options: 0]];
rep = [[NSBitmapImageRep alloc] initWithData:[[NSData alloc] initWithBase64EncodedString: INWindowBackgroundPatternOverlayLayer
options: NSDataBase64DecodingIgnoreUnknownCharacters]];
#else
rep = [[NSBitmapImageRep alloc] initWithData:[[NSData alloc] initWithBase64Encoding:INWindowBackgroundPatternOverlayLayer]];
#endif
NSImage *image = [[NSImage alloc] initWithSize:rep.size];
[image addRepresentation:rep];

#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_9
[image addRepresentation:[[NSBitmapImageRep alloc] initWithData:[[NSData alloc] initWithBase64EncodedString: INWindowBackgroundPatternOverlayLayer2x options: 0]]];
[image addRepresentation:[[NSBitmapImageRep alloc] initWithData:[[NSData alloc] initWithBase64EncodedString: INWindowBackgroundPatternOverlayLayer2x
options: NSDataBase64DecodingIgnoreUnknownCharacters]]];
#else
[image addRepresentation:[[NSBitmapImageRep alloc] initWithData:[[NSData alloc] initWithBase64Encoding:INWindowBackgroundPatternOverlayLayer2x]]];
#endif
Expand Down

0 comments on commit 044dd93

Please sign in to comment.