ObjFW  Diff

Differences From Artifact [f05c35edb7]:

To Artifact [0463ac5206]:


793
794
795
796
797
798
799




800
801
802
803
804
805
806
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810







+
+
+
+








	if (_stream == nil)
		@throw [OFNotOpenException exceptionWithObject: self];

	if (_atEndOfStream)
		return 0;

	if ([_stream isAtEndOfStream] &&
	    ![_decompressedStream hasDataInReadBuffer])
		@throw [OFTruncatedDataException exception];

#if SIZE_MAX >= UINT64_MAX
	if (length > UINT64_MAX)
		@throw [OFOutOfRangeException exception];
#endif

	if ((uint64_t)length > _toRead)
		length = (size_t)_toRead;