summaryrefslogtreecommitdiffstats
path: root/Lib/stringold.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/stringold.py')
-rw-r--r--Lib/stringold.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/stringold.py b/Lib/stringold.py
index 2a4feae..3790357 100644
--- a/Lib/stringold.py
+++ b/Lib/stringold.py
@@ -83,7 +83,7 @@ def splitfields(s, sep):
index_error = 'substring not found in string.index'
def index(s, sub):
n = len(sub)
- for i in range(len(s) - n):
+ for i in range(len(s) + 1 - n):
if sub = s[i:i+n]: return i
raise index_error, (s, sub)