fix stupid bug in strip and split

This commit is contained in:
Guido van Rossum 1995-02-14 00:58:59 +00:00
parent 26a9f7467f
commit ee1813de2a
1 changed files with 2 additions and 2 deletions

View File

@ -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) {