Commit 2d49ebc5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Title Decrapifier: fix infamous app crash if file name length < 6

parent 74e21016
......@@ -115,6 +115,9 @@ static inline NSNumber *numberFromTwoChars(char high, char low)
NSMutableDictionary *mutableDict;
NSUInteger stringLength = [str length];
if (stringLength < 6)
return nil;
// Search for s01e10.
for (NSUInteger i = 0; i < stringLength - 5; i++) {
if (c(str, i) == 's' &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment