diff Objects/bytesobject.c @ 39643:3dd61ffd049e

Fix buglet in slice assignment of bytesobjects: assigning to b[3:0] ('stop' being before 'start') would actually assign to b[0:0] (or whatever 'stop' was)
author Thomas Wouters <thomas@python.org>
date Wed, 23 Aug 2006 23:20:29 +0000
parents 8d71f9a6c1c3
children 9548ca0e6560
line wrap: on
line diff
--- a/Objects/bytesobject.c	Wed Aug 23 18:13:39 2006 +0000
+++ b/Objects/bytesobject.c	Wed Aug 23 23:20:29 2006 +0000
@@ -310,6 +310,8 @@
 
     if (lo < 0)
         lo = 0;
+    if (hi < lo)
+        hi = lo;
     if (hi > self->ob_size)
         hi = self->ob_size;