ObjFW  Check-in [ada612eac9]

Overview
Comment:OFArray: Fix MessagePack encoding
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ada612eac94f109dd0b6b793b912cd4d02d0e206fc65dfb1462939ab2894c945
User & Date: js on 2017-08-13 13:50:26
Other Links: manifest | tags
Context
2017-08-13
22:34
OFZIPArchive(Entry): Remove ZIP64 from extra field check-in: 8ebf6ed443 user: js tags: trunk
13:50
OFArray: Fix MessagePack encoding check-in: ada612eac9 user: js tags: trunk
13:48
Add functions to read & write BE/LE value pointers check-in: 6202189a07 user: js tags: trunk
Changes

Modified src/OFArray.m from [b6dec58036] to [190702fc68].

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];