ObjFW  Check-in [6ae6830243]

Overview
Comment:OFZIPArchive: Restore accidentally dropped cast
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6ae68302430bfbdd9b4c79f22d915a1d4eea630c2a026a9c6030048a14d03f29
User & Date: js on 2022-08-27 20:46:16
Other Links: manifest | tags
Context
2022-08-27
20:58
OFSeekableStream: Add OFSeekWhence enum check-in: 73f5e3aa84 user: js tags: trunk
20:46
OFZIPArchive: Restore accidentally dropped cast check-in: 6ae6830243 user: js tags: trunk
20:42
OFTarArchive: Clean up types check-in: fc63341028 user: js tags: trunk
Changes

Modified src/OFZIPArchive.m from [6a0897ace1] to [038073c897].

890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
		@throw [OFOutOfRangeException exception];

	@try {
		[_stream writeBuffer: buffer length: length];
	} @catch (OFWriteFailedException *e) {
		OFEnsure(e.bytesWritten <= length);

		_bytesWritten += e.bytesWritten;
		_CRC32 = OFCRC32(_CRC32, buffer, e.bytesWritten);

		if (e.errNo == EWOULDBLOCK || e.errNo == EAGAIN)
			return e.bytesWritten;

		@throw e;
	}

	_bytesWritten += length;
	_CRC32 = OFCRC32(_CRC32, buffer, length);

	return length;
}

- (void)close
{







|








|







890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
		@throw [OFOutOfRangeException exception];

	@try {
		[_stream writeBuffer: buffer length: length];
	} @catch (OFWriteFailedException *e) {
		OFEnsure(e.bytesWritten <= length);

		_bytesWritten += (unsigned long long)e.bytesWritten;
		_CRC32 = OFCRC32(_CRC32, buffer, e.bytesWritten);

		if (e.errNo == EWOULDBLOCK || e.errNo == EAGAIN)
			return e.bytesWritten;

		@throw e;
	}

	_bytesWritten += (unsigned long long)length;
	_CRC32 = OFCRC32(_CRC32, buffer, length);

	return length;
}

- (void)close
{