Skip to content

Commit 42042df

Browse files
committed
Merge pull request nicklockwood#10 from JaSpa/patch-1
Write stringCount into intended bytes
2 parents e70db0f + 33c3d66 commit 42042df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FastCoder/FastCoder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ + (NSData *)dataWithRootObject:(id)object
11901190

11911191
//set string count
11921192
uint32_t stringCount = (uint32_t)[stringCache count];
1193-
[output replaceBytesInRange:NSMakeRange(sizeof(header) + sizeof(uint32_t), sizeof(uint32_t)) withBytes:&stringCount];
1193+
[output replaceBytesInRange:NSMakeRange(sizeof(header) + 2 * sizeof(uint32_t), sizeof(uint32_t)) withBytes:&stringCount];
11941194

11951195
return output;
11961196
}

0 commit comments

Comments
 (0)