mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix incorrect memcpy
This commit is contained in:
parent
5333986819
commit
1f20347546
@ -158,7 +158,7 @@ static UChar* python_to_icu(PyObject *obj, int32_t *osz) {
|
|||||||
ans[i] = data[i];
|
ans[i] = data[i];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
memcpy(ans, data, sz);
|
memcpy(ans, data, sz * sizeof(UChar));
|
||||||
}
|
}
|
||||||
// add null terminator
|
// add null terminator
|
||||||
ans[sz] = 0;
|
ans[sz] = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user