diff --git a/SUPipedUnarchiver.m b/SUPipedUnarchiver.m index 0c691e09..e3481ff9 100644 --- a/SUPipedUnarchiver.m +++ b/SUPipedUnarchiver.m @@ -24,6 +24,7 @@ id currentType; while ((currentType = [typeEnumerator nextObject])) { + if ([currentType length] > [lastPathComponent length]) continue; if ([[lastPathComponent substringFromIndex:[lastPathComponent length] - [currentType length]] isEqualToString:currentType]) return NSSelectorFromString([typeSelectorDictionary objectForKey:currentType]); }