Issue #11286: Fixed unpickling of empty 2.x strings.

This commit is contained in:
Alexander Belopolsky 2011-02-24 19:40:09 +00:00
parent 6c3787cb70
commit 1ce92dc20d
4 changed files with 12 additions and 13 deletions

View file

@ -977,11 +977,6 @@ _Unpickler_Read(UnpicklerObject *self, char **s, Py_ssize_t n)
{
Py_ssize_t num_read;
if (n == 0) {
*s = NULL;
return 0;
}
if (self->next_read_idx + n <= self->input_len) {
*s = self->input_buffer + self->next_read_idx;
self->next_read_idx += n;