This commit is contained in:
Kovid Goyal 2018-10-11 09:07:24 +05:30
commit 2529c2104c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -158,7 +158,7 @@ static UChar* python_to_icu(PyObject *obj, int32_t *osz) {
ans[i] = data[i];
}
} else {
memcpy(ans, data, sz);
memcpy(ans, data, sz * sizeof(UChar));
}
// add null terminator
ans[sz] = 0;