mirror of https://github.com/python/cpython.git
fix compiler compliant about \0 not being an opcode
This commit is contained in:
parent
53ffdc53bf
commit
adde86d0e3
|
@ -5298,13 +5298,12 @@ load(UnpicklerObject *self)
|
|||
case STOP:
|
||||
break;
|
||||
|
||||
case '\0':
|
||||
PyErr_SetNone(PyExc_EOFError);
|
||||
return NULL;
|
||||
|
||||
default:
|
||||
PyErr_Format(UnpicklingError,
|
||||
"invalid load key, '%c'.", s[0]);
|
||||
if (s[0] == '\0')
|
||||
PyErr_SetNone(PyExc_EOFError);
|
||||
else
|
||||
PyErr_Format(UnpicklingError,
|
||||
"invalid load key, '%c'.", s[0]);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue