[LyX/master] Fix infinite loop. Thinko!

Richard Kimberly Heck rikiheck at lyx.org
Tue Dec 6 03:42:03 UTC 2022


commit 8567e09dbf79ef4e0919fe73f81364d89bc7c7e2
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Mon Dec 5 23:37:40 2022 -0500

    Fix infinite loop. Thinko!
---
 lib/lyx2lyx/lyx_2_4.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 4196983..72fda1e 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -4571,10 +4571,11 @@ def revert_starred_refs(document):
                 continue
             # If we are not using hyperref, then we just need to delete the line
             if not use_hyperref:
-                i = find_token(document.body, "nolink", i, end)
-                if i == -1:
+                k = find_token(document.body, "nolink", i, end)
+                if k == -1:
+                    i = end
                     continue
-                del document.body[i]
+                del document.body[k]
                 i = end - 1
                 continue
             # If we are using hyperref, then we'll need to do more.


More information about the lyx-cvs mailing list