Mercurial > hg-stable
changeset 39244:ec6d5a9d1631
index: don't include nullid in boundary check in pure code
Yet another change that should probably have been part of a3dacabd476b
(index: don't allow index[len(index)] to mean nullid, 2018-07-20).
Differential Revision: https://phab.mercurial-scm.org/D4333
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 18 Aug 2018 00:01:31 -0700 |
parents | eaa14dff3226 |
children | 5961517fd2a8 |
files | mercurial/pure/parsers.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/pure/parsers.py Mon Aug 20 16:13:17 2018 -0400 +++ b/mercurial/pure/parsers.py Sat Aug 18 00:01:31 2018 -0700 @@ -47,7 +47,7 @@ def _fix_index(self, i): if not isinstance(i, int): raise TypeError("expecting int indexes") - if i < 0 or i >= len(self) + 1: + if i < 0 or i >= len(self): raise IndexError return i