commit | 4fc8ae424f915d07ff56d32dceec3d2c4a89560e | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Feb 27 20:57:45 2007 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Feb 27 20:57:45 2007 +0000 |
tree | 27c11de69e5ec8b118ccade9865adf1b84c93ffc | |
parent | 6f8fe151da16f43fc5d0c5167fc3d9432f993f70 [diff] [blame] |
Fix off-by-one bug in memmove() call in bytes_insert(). Fix by Pete Shinners (for his own bug :-).
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index f7de8bd..f07130d 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c
@@ -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;