summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-05-01 17:36:58 (GMT)
committerGuido van Rossum <guido@python.org>2000-05-01 17:36:58 (GMT)
commit22b65a8edcb86fc878dd925aaf9e68f099fbb4cb (patch)
treee520d89592ebee743751698d6b2fb7bce56a1c86 /Python/import.c
parent93a8eacde559ef3fd910f80f59208054ff99dab9 (diff)
downloadcpython-22b65a8edcb86fc878dd925aaf9e68f099fbb4cb.zip
cpython-22b65a8edcb86fc878dd925aaf9e68f099fbb4cb.tar.gz
cpython-22b65a8edcb86fc878dd925aaf9e68f099fbb4cb.tar.bz2
Robin Becker: The following patch seems to fix a module case bug in
1.6a2 caused by wrong return values in routine allcaps83. [GvR: I also changed the case for end-s>8 to return 0.]
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c
index c3f890b..f33f9a1 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1035,15 +1035,15 @@ allcaps8x3(s)
char *end = strchr(s, '\0');
if (dot != NULL) {
if (dot-s > 8)
- return 1; /* More than 8 before '.' */
+ return 0; /* More than 8 before '.' */
if (end-dot > 4)
- return 1; /* More than 3 after '.' */
+ return 0; /* More than 3 after '.' */
end = strchr(dot+1, '.');
if (end != NULL)
- return 1; /* More than one dot */
+ return 0; /* More than one dot */
}
else if (end-s > 8)
- return 1; /* More than 8 and no dot */
+ return 0; /* More than 8 and no dot */
while ((c = *s++)) {
if (islower(c))
return 0;