summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 292d02b1c2..a3af7f6a85 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -2313,7 +2313,7 @@ PyObject *_PyUnicode_DecodeUnicodeInternal(const char *s,
end = s + size;
while (s < end) {
- *p = *(Py_UNICODE *)s;
+ memcpy(p, s, sizeof(Py_UNICODE));
/* We have to sanity check the raw data, otherwise doom looms for
some malformed UCS-4 data. */
if (