Test for zero-length argument in capitalize().

This commit is contained in:
Guido van Rossum 1996-06-17 16:59:33 +00:00
parent 26b310a3fd
commit 529c963d36

View file

@ -384,7 +384,7 @@ strop_capitalize(self, args)
return NULL;
s_new = getstringvalue(new);
changed = 0;
{
if (0 < n) {
int c = Py_CHARMASK(*s++);
if (islower(c)) {
changed = 1;