[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5247] Fix improper string indexing.
From: |
Sergey Poznyakoff |
Subject: |
[5247] Fix improper string indexing. |
Date: |
Sun, 31 Mar 2013 16:11:51 +0000 |
Revision: 5247
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5247
Author: gray
Date: 2013-03-31 16:11:49 +0000 (Sun, 31 Mar 2013)
Log Message:
-----------
Fix improper string indexing.
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/indices.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2013-03-31 15:47:29 UTC (rev 5246)
+++ trunk/ChangeLog 2013-03-31 16:11:49 UTC (rev 5247)
@@ -1,5 +1,10 @@
2013-03-31 Sergey Poznyakoff <address@hidden>
+ * info/indices.c (info_next_index_match): Fix improper string
+ indexing. Based on report from Eli Zaretskii.
+
+2013-03-31 Sergey Poznyakoff <address@hidden>
+
Fix \b[...\b] tag processing.
* info/nodes.h (TAG) <content_cache>: New member.
Modified: trunk/info/indices.c
===================================================================
--- trunk/info/indices.c 2013-03-31 15:47:29 UTC (rev 5246)
+++ trunk/info/indices.c 2013-03-31 16:11:49 UTC (rev 5247)
@@ -416,14 +416,14 @@
/* When looking for substrings, take care not to return previous exact
matches. */
for (i = index_offset + dir; (i > -1) && (index_index[i]); i += dir)
- if (!index_entry_matches (index_index[i], index_search, search_len) &&
- string_in_line (index_search, index_index[i]->label) != -1)
+ if (!index_entry_matches (index_index[i], index_search, search_len))
{
- partial = 1;
- break;
+ partial = string_in_line (index_search, index_index[i]->label);
+ if (partial != -1)
+ break;
}
+ index_partial = partial > 0;
}
- index_partial = partial;
/* If that failed, print an error. */
if ((i < 0) || (!index_index[i]))
@@ -459,7 +459,7 @@
string matched. */
match = xstrdup (index_index[i]->label);
- if (partial && show_index_match)
+ if (partial > 0 && show_index_match)
{
int k, ls, start, upper;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5247] Fix improper string indexing.,
Sergey Poznyakoff <=