ObjFW  Diff

Differences From Artifact [d61077ef08]:

To Artifact [ada3b84c8f]:


1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430

	i = j = 0;

	while (i < length) {
		of_unichar_t c;
		size_t clen;

		clen = of_string_utf8_to_unicode(string + i, length - 1, &c);

		if (clen == 0 || c > 0x10FFFF) {
			free(ret);
			@throw [OFInvalidEncodingException newWithClass: isa];
		}

		ret[j++] = c;







|







1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430

	i = j = 0;

	while (i < length) {
		of_unichar_t c;
		size_t clen;

		clen = of_string_utf8_to_unicode(string + i, length - i, &c);

		if (clen == 0 || c > 0x10FFFF) {
			free(ret);
			@throw [OFInvalidEncodingException newWithClass: isa];
		}

		ret[j++] = c;