diff options
author | Guido van Rossum <guido@python.org> | 1996-06-17 16:59:33 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-06-17 16:59:33 (GMT) |
commit | 529c963d36bc9ff2876bc75a43ed4b729a1b4bec (patch) | |
tree | 1bbb347f3e4a5d04e34b1afa13aecc6215f76bcb /Modules/stropmodule.c | |
parent | 26b310a3fd3e4aa7444baa5769344f056e8dd64e (diff) | |
download | cpython-529c963d36bc9ff2876bc75a43ed4b729a1b4bec.zip cpython-529c963d36bc9ff2876bc75a43ed4b729a1b4bec.tar.gz cpython-529c963d36bc9ff2876bc75a43ed4b729a1b4bec.tar.bz2 |
Test for zero-length argument in capitalize().
Diffstat (limited to 'Modules/stropmodule.c')
-rw-r--r-- | Modules/stropmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ 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; |