summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-02-14 00:58:59 (GMT)
committerGuido van Rossum <guido@python.org>1995-02-14 00:58:59 (GMT)
commitee1813de2adf255406a4b201af0f3a10c0c84e1f (patch)
tree7463626106a4ee905d3872089f91b0b5e685c0d4 /Modules
parent26a9f7467f224897a737a1f6c0614ead9f388554 (diff)
downloadcpython-ee1813de2adf255406a4b201af0f3a10c0c84e1f.zip
cpython-ee1813de2adf255406a4b201af0f3a10c0c84e1f.tar.gz
cpython-ee1813de2adf255406a4b201af0f3a10c0c84e1f.tar.bz2
fix stupid bug in strip and split
Diffstat (limited to 'Modules')
-rw-r--r--Modules/stropmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c
index 90ee4fd..4e9d0ee 100644
--- a/Modules/stropmodule.c
+++ b/Modules/stropmodule.c
@@ -55,7 +55,7 @@ strop_split(self, args)
i = i+1;
}
j = i;
- while (i < len && isspace(Py_CHARMASK(s[i]))) {
+ while (i < len && !isspace(Py_CHARMASK(s[i]))) {
i = i+1;
}
if (j < i) {
@@ -278,7 +278,7 @@ strop_strip(self, args)
j = len;
do {
j--;
- } while (j >= i && isspace(Py_CHARMASK(s[i])));
+ } while (j >= i && isspace(Py_CHARMASK(s[j])));
j++;
if (i == 0 && j == len) {