mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Make sure we don't go beyond the end of the lines.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36096 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7529918b08
commit
e0227fa396
@ -46,7 +46,7 @@ def find_token(lines, token, start, end = 0, exact = False):
|
||||
|
||||
Return -1 on failure."""
|
||||
|
||||
if end == 0:
|
||||
if end == 0 or end > len(lines):
|
||||
end = len(lines)
|
||||
m = len(token)
|
||||
for i in xrange(start, end):
|
||||
|
Loading…
Reference in New Issue
Block a user