Mercurial > cpython-lru_cache-weakref
diff Objects/bytesobject.c @ 40982:431b3238593e
Fix off-by-one bug in memmove() call in bytes_insert().
Fix by Pete Shinners (for his own bug :-).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 27 Feb 2007 20:57:45 +0000 |
| parents | 61fee1853ca8 |
| children | 339015d98b78 |
line wrap: on
line diff
--- a/Objects/bytesobject.c Tue Feb 27 20:16:38 2007 +0000 +++ b/Objects/bytesobject.c Tue Feb 27 20:57:45 2007 +0000 @@ -2313,7 +2313,7 @@ } if (where > n) where = n; - memmove(self->ob_bytes + where + 1, self->ob_bytes + where, n - where + 1); + memmove(self->ob_bytes + where + 1, self->ob_bytes + where, n - where); self->ob_bytes[where] = value; Py_RETURN_NONE;
