[pypy-commit] pypy virtual-arguments: and another one

fijal noreply at buildbot.pypy.org
Thu Jul 19 17:44:27 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56225:aba9f3942e92
Date: 2012-07-19 17:44 +0200
http://bitbucket.org/pypy/pypy/changeset/aba9f3942e92/

Log:	and another one

diff --git a/pypy/module/unicodedata/interp_ucd.py b/pypy/module/unicodedata/interp_ucd.py
--- a/pypy/module/unicodedata/interp_ucd.py
+++ b/pypy/module/unicodedata/interp_ucd.py
@@ -227,7 +227,10 @@
                                  space.wrap('invalid normalization form'))
 
         strlen = space.len_w(w_unistr)
-        result = [0] * (strlen + strlen / 10 + 10)
+        lgt = (strlen + strlen / 10 + 10)
+        if lgt < 0:
+            lgt = 0
+        result = [0] * lgt
         j = 0
         resultlen = len(result)
         # Expand the character


More information about the pypy-commit mailing list