ObjFW  Check-in [abe1d8cb58]

Overview
Comment:OFArray: Fix MessagePack encoding
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.90
Files: files | file ages | folders
SHA3-256: abe1d8cb5830ccc74de0cfa80070dfecd2f412bf0c2b853582ef2331cf4dfe35
User & Date: js on 2017-08-13 13:50:46
Other Links: branch diff | manifest | tags
Context
2017-08-13
22:38
Fix -[OFData description] check-in: 793b89e263 user: js tags: 0.90
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
Changes

Modified src/OFArray.m from [15022d3186] to [bc7d3f13f5].

672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
		uint8_t type = 0xDC;
		uint16_t tmp = OF_BSWAP16_IF_LE((uint16_t)count);

		[data addItem: &type];
		[data addItems: &tmp
			 count: sizeof(tmp)];
	} else if (count <= UINT32_MAX) {
		uint8_t type = 0xDC;
		uint32_t tmp = OF_BSWAP32_IF_LE((uint32_t)count);

		[data addItem: &type];
		[data addItems: &tmp
			 count: sizeof(tmp)];
	} else
		@throw [OFOutOfRangeException exception];







|







672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
		uint8_t type = 0xDC;
		uint16_t tmp = OF_BSWAP16_IF_LE((uint16_t)count);

		[data addItem: &type];
		[data addItems: &tmp
			 count: sizeof(tmp)];
	} else if (count <= UINT32_MAX) {
		uint8_t type = 0xDD;
		uint32_t tmp = OF_BSWAP32_IF_LE((uint32_t)count);

		[data addItem: &type];
		[data addItems: &tmp
			 count: sizeof(tmp)];
	} else
		@throw [OFOutOfRangeException exception];