Fix the PDF data detection

This commit is contained in:
DreamPiggy 2020-01-30 15:29:15 +08:00
parent 96b0a2e031
commit 8c6556e835
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@
case 0x25: {
if (data.length >= 4) {
//%PDF
NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(1, 4)] encoding:NSASCIIStringEncoding];
NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(1, 3)] encoding:NSASCIIStringEncoding];
if ([testString isEqualToString:@"PDF"]) {
return SDImageFormatPDF;
}