summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-06-17 16:59:33 (GMT)
committerGuido van Rossum <guido@python.org>1996-06-17 16:59:33 (GMT)
commit529c963d36bc9ff2876bc75a43ed4b729a1b4bec (patch)
tree1bbb347f3e4a5d04e34b1afa13aecc6215f76bcb /Modules
parent26b310a3fd3e4aa7444baa5769344f056e8dd64e (diff)
downloadcpython-529c963d36bc9ff2876bc75a43ed4b729a1b4bec.zip
cpython-529c963d36bc9ff2876bc75a43ed4b729a1b4bec.tar.gz
cpython-529c963d36bc9ff2876bc75a43ed4b729a1b4bec.tar.bz2
Test for zero-length argument in capitalize().
Diffstat (limited to 'Modules')
-rw-r--r--Modules/stropmodule.c2
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;