From: Francesco Potortì Date: Wed, 3 Sep 2003 14:20:49 +0000 (+0000) Subject: (consider_token): check C++ `operator' only when the token len is long X-Git-Tag: ttn-vms-21-2-B4~8912 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2bc2e3fcb5cfd8479041e8e7d1ee8960f5454784;p=emacs.git (consider_token): check C++ `operator' only when the token len is long enough. --- diff --git a/lib-src/etags.c b/lib-src/etags.c index 4a10a6c2001..e9fab1be3ee 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -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;