commit | 529c963d36bc9ff2876bc75a43ed4b729a1b4bec | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Mon Jun 17 16:59:33 1996 +0000 |
committer | Guido van Rossum <guido@python.org> | Mon Jun 17 16:59:33 1996 +0000 |
tree | 1bbb347f3e4a5d04e34b1afa13aecc6215f76bcb | |
parent | 26b310a3fd3e4aa7444baa5769344f056e8dd64e [diff] [blame] |
Test for zero-length argument in capitalize().
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c index 52d4cee..069d5f4 100644 --- a/Modules/stropmodule.c +++ b/Modules/stropmodule.c
@@ -384,7 +384,7 @@ return NULL; s_new = getstringvalue(new); changed = 0; - { + if (0 < n) { int c = Py_CHARMASK(*s++); if (islower(c)) { changed = 1;