(consider_token): check C++ `operator' only when the token len is long
authorFrancesco Potortì <pot@gnu.org>
Wed, 3 Sep 2003 14:20:49 +0000 (14:20 +0000)
committerFrancesco Potortì <pot@gnu.org>
Wed, 3 Sep 2003 14:20:49 +0000 (14:20 +0000)
enough.

lib-src/etags.c

index 4a10a6c..e9fab1b 100644 (file)
@@ -3116,7 +3116,7 @@ consider_token (str, len, c, c_extp, cblev, parlev, is_func_or_var)
              fvdef = vignore;
              return FALSE;
            }
-         if (strneq (str+len-10, "::operator", 10))
+         if (len >= 10 && strneq (str+len-10, "::operator", 10))
            {
              if (*c_extp & C_AUTO) /* automatic detection of C++ */
                *c_extp = (*c_extp | C_PLPL) & ~C_AUTO;