ObjFW  Diff

Differences From Artifact [95748cc907]:

To Artifact [caaaf51219]:


276
277
278
279
280
281
282
283
284
285

286
287
288
289
290
291

292
293

294
295
296
297
298

299
300
301
302
303
304

305
306

307
308
309
310
311
312
313
314
276
277
278
279
280
281
282



283

284
285
286
287

288
289

290
291
292



293

294
295
296
297

298
299

300

301
302
303
304
305
306
307







-
-
-
+
-




-
+

-
+


-
-
-
+
-




-
+

-
+
-







		if (length < 9)
			@throw [OFTruncatedDataException exception];

		*object = [OFNumber numberWithInt64: readUInt64(buffer + 1)];
		return 9;
	/* Floating point */
	case 0xCA:; /* float 32 */
		union {
			unsigned char u8[4];
			float f;
		float f;
		} f;

		if (length < 5)
			@throw [OFTruncatedDataException exception];

		memcpy(&f.u8, buffer + 1, 4);
		memcpy(&f, buffer + 1, 4);

		*object = [OFNumber numberWithFloat: OF_BSWAP_FLOAT_IF_LE(f.f)];
		*object = [OFNumber numberWithFloat: OF_BSWAP_FLOAT_IF_LE(f)];
		return 5;
	case 0xCB:; /* float 64 */
		union {
			unsigned char u8[8];
			double d;
		double d;
		} d;

		if (length < 9)
			@throw [OFTruncatedDataException exception];

		memcpy(&d.u8, buffer + 1, 8);
		memcpy(&d, buffer + 1, 8);

		*object = [OFNumber numberWithDouble:
		*object = [OFNumber numberWithDouble: OF_BSWAP_DOUBLE_IF_LE(d)];
		    OF_BSWAP_DOUBLE_IF_LE(d.d)];
		return 9;
	/* nil */
	case 0xC0:
		*object = [OFNull null];
		return 1;
	/* false */
	case 0xC2: