ObjFW  Diff

Differences From Artifact [fb7ee6732e]:

To Artifact [b56b81b94d]:


1592
1593
1594
1595
1596
1597
1598
1599

1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1592
1593
1594
1595
1596
1597
1598

1599

1600

1601
1602
1603
1604
1605
1606
1607







-
+
-

-








	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) {
		if (cLen == 0 || c > 0x10FFFF)
			free(ret);
			@throw [OFInvalidEncodingException newWithClass: isa];
		}

		ret[j++] = c;
		i += cLen;
	}

	ret[j] = 0;