1. Ian Dundas
  2. CHCSVParser

Commits

Dave DeLong  committed 314d524 Merge

Merge pull request #2 from benrb/master

Found crash in encoding detection

  • Participants
  • Parent commits f2b0235, c8e5b24
  • Branches master

Comments (0)

Files changed (1)

File CHCSVParser.m

View file
         fileEncoding = [self textEncodingForData:currentChunk offset:&offset];
         if (offset > 0) {
             // strip off the text encoding bytes
-            [currentChunk replaceBytesInRange:NSMakeRange(0, offset) withBytes:NULL];
+            [currentChunk replaceBytesInRange:NSMakeRange(0, offset) withBytes:NULL length:0];
         }
         [self extractStringFromCurrentChunk];
     }