245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
toCopy = length;
memcpy(_incompleteUTF8Surrogate + _incompleteUTF8SurrogateLen,
buffer, toCopy);
_incompleteUTF8SurrogateLen += toCopy;
if (_incompleteUTF8SurrogateLen < (size_t)UTF8Len)
return;
UTF8Len = of_string_utf8_decode(
_incompleteUTF8Surrogate, _incompleteUTF8SurrogateLen, &c);
if (UTF8Len <= 0 || c > 0x10FFFF) {
assert(UTF8Len == 0 || UTF8Len < -4);
|
|
|
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
toCopy = length;
memcpy(_incompleteUTF8Surrogate + _incompleteUTF8SurrogateLen,
buffer, toCopy);
_incompleteUTF8SurrogateLen += toCopy;
if (_incompleteUTF8SurrogateLen < (size_t)UTF8Len)
return 0;
UTF8Len = of_string_utf8_decode(
_incompleteUTF8Surrogate, _incompleteUTF8SurrogateLen, &c);
if (UTF8Len <= 0 || c > 0x10FFFF) {
assert(UTF8Len == 0 || UTF8Len < -4);
|