]> git.lyx.org Git - features.git/commitdiff
Fix infinite loop. Thinko!
authorRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 6 Dec 2022 04:37:40 +0000 (23:37 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 6 Dec 2022 04:37:40 +0000 (23:37 -0500)
lib/lyx2lyx/lyx_2_4.py

index 4196983baaa870984d163bcbc5f897e5bad1a207..72fda1e0b7847b6d45ba6c44aa9d2f9733b7109a 100644 (file)
@@ -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.