ObjFW  Check-in [e874c297ba]

Overview
Comment:Fix warning with 32 bit Clang
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.90
Files: files | file ages | folders
SHA3-256: e874c297ba533411c46754e7905797affff0382ccff5e5912d28573724eb5939
User & Date: js on 2017-08-11 18:20:24
Other Links: branch diff | manifest | tags
Context
2017-08-13
13:50
OFArray: Fix MessagePack encoding check-in: abe1d8cb58 user: js tags: 0.90
2017-08-11
18:20
Fix warning with 32 bit Clang check-in: e874c297ba user: js tags: 0.90
15:47
of_asprintf: Don't require set up OFLocalization check-in: 6a96844ffe user: js tags: 0.90
Changes

Modified src/OFZIPArchive.m from [aac05f3a80] to [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];