commit | 9e9ef9fa5a789f02a04c08998c4b74af9686e43a | [log] [tgz] |
---|---|---|
author | Fredrik Lundh <fredrik@pythonware.com> | Tue May 30 17:39:58 2006 +0000 |
committer | Fredrik Lundh <fredrik@pythonware.com> | Tue May 30 17:39:58 2006 +0000 |
tree | b91231451b625b956e3d7fd3e7d6212672a0479d | |
parent | 4182a755717a6c05637ec1a44445e4524102928b [diff] [blame] |
changed count to return 0 for slices outside the source string
diff --git a/Objects/stringlib/count.h b/Objects/stringlib/count.h index 84a852f..367a15c 100644 --- a/Objects/stringlib/count.h +++ b/Objects/stringlib/count.h
@@ -15,7 +15,7 @@ if (sub_len == 0) { if (str_len < 0) - return 1; /* start >= len(str) */ + return 0; /* start > len(str) */ return str_len + 1; }