mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Allocate one more character, so that the terminating
nullbyte can be copied.
This commit is contained in:
parent
68937b4cbc
commit
9992835c6e
1 changed files with 1 additions and 1 deletions
|
@ -427,7 +427,7 @@ PyObject *PyUnicode_FromString(const char *u)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unicode = _PyUnicode_New(size);
|
unicode = _PyUnicode_New(size+1);
|
||||||
if (!unicode)
|
if (!unicode)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue