changeset 45926:5425e4687a4e

A bug in the new function. No change log.
author Francesco Potortì <pot@gnu.org>
date Thu, 20 Jun 2002 12:20:15 +0000
parents 5f3ac9accae3
children fe500ec40b82
files lib-src/etags.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/etags.c	Thu Jun 20 11:48:31 2002 +0000
+++ b/lib-src/etags.c	Thu Jun 20 12:20:15 2002 +0000
@@ -1864,15 +1864,17 @@
      int lno;			/* line number */
      long cno;			/* character number */
 {
-  register char *cp;
-  bool named;
-
-  named = TRUE;
+  bool named = TRUE;
+
   if (!CTAGS)
     {
-      for (cp = name; !notinname (*cp); cp++)
-	continue;
-      if (*cp == '\0')				/* rule #1 */
+      int i;
+      register char *cp = name;
+
+      for (i = 0; i < namelen; i++)
+	if (notinname (*cp++))
+	  break;
+      if (i == namelen)				/* rule #1 */
 	{
 	  cp = linestart + linelen - namelen;
 	  if (notinname (linestart[linelen-1]))