ObjFW  Diff

Differences From Artifact [3df34606f0]:

To Artifact [d2f44563d3]:


349
350
351
352
353
354
355



356
357
358
359
360
361
362
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365







+
+
+








	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 = [_stream readIntoBuffer: buffer
			       length: length];

	if (ret == 0)