ObjFW  Diff

Differences From Artifact [76b8e70f25]:

To Artifact [fa0ccd29a1]:


746
747
748
749
750
751
752








753
754
755
756
757
758
759
		[data addItems: &tmp16 count: sizeof(tmp16)];
		[data addItems: extension.items count: extension.count];
	}

	/* Zero-length extension to terminate */
	[data increaseCountBy: 2];









	headerSize = data.count;

	if (headerSize > UINT16_MAX)
		@throw [OFOutOfRangeException exception];

	/* Now fill in the size and CRC16 for the entire header */
	tmp16 = OFToLittleEndian16(headerSize);







>
>
>
>
>
>
>
>







746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
		[data addItems: &tmp16 count: sizeof(tmp16)];
		[data addItems: extension.items count: extension.count];
	}

	/* Zero-length extension to terminate */
	[data increaseCountBy: 2];

	/*
	 * Some implementations only check the first byte to see if the end of
	 * the archive has been reached, which is 0 for every multiple of 256.
	 * Add one byte of padding to avoid this.
	 */
	if ((data.count & 0xFF) == 0)
		[data increaseCountBy: 1];

	headerSize = data.count;

	if (headerSize > UINT16_MAX)
		@throw [OFOutOfRangeException exception];

	/* Now fill in the size and CRC16 for the entire header */
	tmp16 = OFToLittleEndian16(headerSize);