ObjFW  Diff

Differences From Artifact [a5dd4c3dce]:

To Artifact [349c80f1a5]:


884
885
886
887
888
889
890
891
892
893
894
895
896
897
898

	if (INT64_MAX - _bytesWritten < (int64_t)length)
		@throw [OFOutOfRangeException exception];

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

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

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








|







884
885
886
887
888
889
890
891
892
893
894
895
896
897
898

	if (INT64_MAX - _bytesWritten < (int64_t)length)
		@throw [OFOutOfRangeException exception];

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

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

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