[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/parsetexi/source_marks.c (relocat
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/parsetexi/source_marks.c (relocate_source_marks): only check removal of source marks that were looked at. |
Date: |
Thu, 09 Feb 2023 09:55:13 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 7f9b3554b1 * tp/Texinfo/XS/parsetexi/source_marks.c
(relocate_source_marks): only check removal of source marks that were looked at.
7f9b3554b1 is described below
commit 7f9b3554b111479493b749f8d74841400157b76f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Feb 9 15:55:04 2023 +0100
* tp/Texinfo/XS/parsetexi/source_marks.c (relocate_source_marks):
only check removal of source marks that were looked at.
---
ChangeLog | 5 +++++
tp/Texinfo/XS/parsetexi/source_marks.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7ee864a6b4..fd8fb8f09d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-02-09 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/parsetexi/source_marks.c (relocate_source_marks):
+ only check removal of source marks that were looked at.
+
2023-02-09 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/parsetexi/source_marks.c (relocate_source_marks):
diff --git a/tp/Texinfo/XS/parsetexi/source_marks.c
b/tp/Texinfo/XS/parsetexi/source_marks.c
index 85d3080516..5f02e8c701 100644
--- a/tp/Texinfo/XS/parsetexi/source_marks.c
+++ b/tp/Texinfo/XS/parsetexi/source_marks.c
@@ -180,7 +180,7 @@ void
relocate_source_marks (SOURCE_MARK_LIST *source_mark_list, ELEMENT *new_e,
size_t begin_position, size_t end_position)
{
- int i;
+ int i, j;
int list_number = source_mark_list->number;
int *indices_to_remove;
@@ -203,9 +203,9 @@ relocate_source_marks (SOURCE_MARK_LIST *source_mark_list,
ELEMENT *new_e,
else if (source_mark->position > end_position)
break;
}
- for (i = list_number - 1; i >= 0; i--)
+ for (j = i; j >= 0; j--)
{
- if (indices_to_remove[i] == 1)
- remove_from_source_mark_list (source_mark_list, i);
+ if (indices_to_remove[j] == 1)
+ remove_from_source_mark_list (source_mark_list, j);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/parsetexi/source_marks.c (relocate_source_marks): only check removal of source marks that were looked at.,
Patrice Dumas <=