mirror of
https://github.com/python/cpython.git
synced 2025-10-07 23:51:16 +00:00
Don't die in resizestring() on filter(<func>, "").
This commit is contained in:
parent
c13bcca268
commit
79d96d6bff
1 changed files with 1 additions and 1 deletions
|
@ -1735,7 +1735,7 @@ filterstring(func, strobj)
|
||||||
GETSTRINGVALUE((stringobject *)item)[0];
|
GETSTRINGVALUE((stringobject *)item)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resizestring(&result, j) < 0)
|
if (j < len && resizestring(&result, j) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue