From: Benjamin Peterson Date: Fri, 23 Sep 2011 17:41:41 +0000 (-0400) Subject: fix compiler compliant about \0 not being an opcode X-Git-Tag: v3.3.0a1~1500^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=adde86d0e31ce486e72a9d1a2a7625e5e34d97e9;p=python fix compiler compliant about \0 not being an opcode --- diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 20ee30299a..164d864980 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -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; }