Permalink
Browse files

Initialise baseOffset to 0 though the if-elseif should always set bas…

…eOffset correctly. #csa
  • Loading branch information...
1 parent 39ec10a commit cdb34ac43346e4014cde32b096e76f5f57258676 @geoffgarside geoffgarside committed Jan 21, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/GITPackFileVersionTwo.m
@@ -110,7 +110,7 @@ - (GITPackObject *)unpackObjectAtOffset: (off_t)offset sha1: (GITObjectHash *)ob
- (GITPackObject *)unpackDeltaPackedObjectAtOffset: (off_t)offset objectHeader: (GITPackFileObjectHeader *)header sha1: (GITObjectHash *)objectHash error: (NSError **)error {
NSData *packedData = [self.data subdataWithRange:NSMakeRange(offset, GITObjectHashPackedLength)];
- off_t baseOffset;
+ off_t baseOffset = 0;
if ( header->type == GITPackFileDeltaTypeRefs ) {
offset += GITObjectHashPackedLength; // Annoyingly this GITObjectHash will just be packed again...

0 comments on commit cdb34ac

Please sign in to comment.