mirror of
https://github.com/python/cpython.git
synced 2025-11-14 07:49:28 +00:00
Test for zero-length argument in capitalize().
This commit is contained in:
parent
26b310a3fd
commit
529c963d36
1 changed files with 1 additions and 1 deletions
|
|
@ -384,7 +384,7 @@ strop_capitalize(self, args)
|
||||||
return NULL;
|
return NULL;
|
||||||
s_new = getstringvalue(new);
|
s_new = getstringvalue(new);
|
||||||
changed = 0;
|
changed = 0;
|
||||||
{
|
if (0 < n) {
|
||||||
int c = Py_CHARMASK(*s++);
|
int c = Py_CHARMASK(*s++);
|
||||||
if (islower(c)) {
|
if (islower(c)) {
|
||||||
changed = 1;
|
changed = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue