[jsinterp] Fix slice
authorPhilipp Hagemeister <phihag@phihag.de>
Fri, 25 Jul 2014 05:04:39 +0000 (07:04 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Fri, 25 Jul 2014 05:04:39 +0000 (07:04 +0200)
youtube_dl/jsinterp.py

index 7f00586ae3217cfaa1b2912316736904eddeb964..c40cd376d120f2063bb4cf6958ca4cf701db1f00 100644 (file)
@@ -108,7 +108,7 @@ class JSInterpreter(object):
                 index, howMany = argvals
                 res = []
                 for i in range(index, min(index + howMany, len(obj))):
-                    res.append(obj.pop(i))
+                    res.append(obj.pop(index))
                 return res
 
             return obj[member](argvals)