blob: 48176af4f321e130a48fda6440f50c545b54c1d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
http://bugs.gentoo.org/140902
revision 1.30
date: 2005-04-05 17:04:16 -0400; author: karl; state: Exp; lines: +6 -4
negative array indexing, grep -c for tests
Index: makeinfo/html.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/html.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- makeinfo/html.c 12 Mar 2005 23:59:39 -0000 1.29
+++ makeinfo/html.c 5 Apr 2005 21:04:16 -0000 1.30
@@ -448,7 +450,7 @@ rollback_empty_tag (char *tag)
return 0;
/* Find the end of the previous tag. */
- while (output_paragraph[check_position-1] != '>' && check_position > 0)
+ while (check_position > 0 && output_paragraph[check_position-1] != '>')
check_position--;
/* Save stuff between tag's end to output_paragraph's end. */
@@ -465,7 +467,7 @@ rollback_empty_tag (char *tag)
}
/* Find the start of the previous tag. */
- while (output_paragraph[check_position-1] != '<' && check_position > 0)
+ while (check_position > 0 && output_paragraph[check_position-1] != '<')
check_position--;
/* Check to see if this is the tag. */
|