mirror of https://github.com/python/cpython
Fix bug in assign_slice for negative index; used length of wrong object!
This commit is contained in:
parent
70083dee12
commit
626dae7a42
|
@ -1592,7 +1592,7 @@ assign_subscript(w, key, v) /* w[key] = v */
|
||||||
else {
|
else {
|
||||||
int i = getintvalue(key);
|
int i = getintvalue(key);
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
i += (*sq->sq_length)(v);
|
i += (*sq->sq_length)(w);
|
||||||
return (*func)(w, i, v);
|
return (*func)(w, i, v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue