Commits

Antonio Cuni committed 2a2c196

kill one more end-of-string check

Comments (0)

Files changed (1)

pypy/module/_fastjson/interp_decoder.py

         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
                 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):