[pypy-svn] r75673 - pypy/branch/interplevel-codecs/pypy/rlib

afa at codespeak.net afa at codespeak.net
Wed Jun 30 11:09:01 CEST 2010


Author: afa
Date: Wed Jun 30 11:09:00 2010
New Revision: 75673

Modified:
   pypy/branch/interplevel-codecs/pypy/rlib/rstring.py
Log:
This code is not translated, but this assert would have detected the out-of-bounds error fixed in the previous change.


Modified: pypy/branch/interplevel-codecs/pypy/rlib/rstring.py
==============================================================================
--- pypy/branch/interplevel-codecs/pypy/rlib/rstring.py	(original)
+++ pypy/branch/interplevel-codecs/pypy/rlib/rstring.py	Wed Jun 30 11:09:00 2010
@@ -56,6 +56,7 @@
         self.l.append(s)
 
     def append_slice(self, s, start, end):
+        assert 0 <= start <= end <= len(s)
         self.l.append(s[start:end])
 
     def append_multiple_char(self, c, times):



More information about the Pypy-commit mailing list