Commit 02c0a78b authored by Guido van Rossum's avatar Guido van Rossum

Fix bug in assign_slice for negative index; used length of wrong object!

parent 1334bc62
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment