From: Guido van Rossum Date: Mon, 17 Jun 1996 16:59:33 +0000 (+0000) Subject: Test for zero-length argument in capitalize(). X-Git-Tag: v1.4b1~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=529c963d36bc9ff2876bc75a43ed4b729a1b4bec;p=thirdparty%2FPython%2Fcpython.git Test for zero-length argument in capitalize(). --- diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c index 52d4cee36683..069d5f444799 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;