ObjFW  Diff

Differences From Artifact [aac05f3a80]:

To Artifact [65a1aa4c22]:


511
512
513
514
515
516
517
518
519
520
521
522
523
524
525

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

	if (_atEndOfStream)
		return 0;

	if (length > UINT64_MAX)
		@throw [OFOutOfRangeException exception];

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

	ret = [_decompressedStream readIntoBuffer: buffer
					   length: length];







|







511
512
513
514
515
516
517
518
519
520
521
522
523
524
525

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

	if (_atEndOfStream)
		return 0;

	if (sizeof(length) >= sizeof(uint64_t) && length > UINT64_MAX)
		@throw [OFOutOfRangeException exception];

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

	ret = [_decompressedStream readIntoBuffer: buffer
					   length: length];