Author: Antonio Cuni <[email protected]>
Branch: fastjson
Changeset: r64841:2a2c1967e1c1
Date: 2013-06-07 18:38 +0200
http://bitbucket.org/pypy/pypy/changeset/2a2c1967e1c1/

Log:    kill one more end-of-string check

diff --git a/pypy/module/_fastjson/interp_decoder.py 
b/pypy/module/_fastjson/interp_decoder.py
--- a/pypy/module/_fastjson/interp_decoder.py
+++ b/pypy/module/_fastjson/interp_decoder.py
@@ -177,7 +177,7 @@
         start = i
         count = 0
         i = self.skip_whitespace(start)
-        while i < self.length:
+        while True:
             ch = self.ll_chars[i]
             if ch == ']':
                 self.pos = i+1
@@ -193,10 +193,11 @@
                 return w_list
             elif ch == ',':
                 pass
+            elif ch == '\0':
+                self._raise("Unterminated array starting at char %d", start)
             else:
                 self._raise("Unexpected '%s' when decoding array (char %d)",
                             ch, self.pos)
-        self._raise("Unterminated array starting at char %d", start)
 
 
     def decode_object(self, i):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to