]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix bug in assign_slice for negative index; used length of wrong object!
authorGuido van Rossum <guido@python.org>
Fri, 10 Jan 1992 00:28:07 +0000 (00:28 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 10 Jan 1992 00:28:07 +0000 (00:28 +0000)
Python/ceval.c

index ec241105b1a09fc50097e46a352c5f41c84049b9..1d0cdb46e8b9985f6f3aecc2396e8eca985af76a 100644 (file)
@@ -1592,7 +1592,7 @@ assign_subscript(w, key, v) /* w[key] = v */
                else {
                        int i = getintvalue(key);
                        if (i < 0)
-                               i += (*sq->sq_length)(v);
+                               i += (*sq->sq_length)(w);
                        return (*func)(w, i, v);
                }
        }