Don't die in resizestring() on filter(<func>, "").

This commit is contained in:
Guido van Rossum 1996-08-16 20:44:34 +00:00
parent c13bcca268
commit 79d96d6bff

View File

@ -1735,7 +1735,7 @@ filterstring(func, strobj)
GETSTRINGVALUE((stringobject *)item)[0];
}
if (resizestring(&result, j) < 0)
if (j < len && resizestring(&result, j) < 0)
return NULL;
return result;