1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

Bug 326418 - fixed false positives in language keyword check.

This commit is contained in:
Sergey Prigogin 2010-10-05 06:24:26 +00:00
parent a10ba4bd8b
commit 64a95583ff

View file

@ -169,8 +169,10 @@ public class CElementHyperlinkDetector extends AbstractHyperlinkDetector {
return true;
}
for (String keyword : keywords.getPreprocessorKeywords()) {
if (keyword.charAt(0) == '#' && keyword.regionMatches(1, word, 0, word.length()))
if (keyword.charAt(0) == '#' && keyword.length() == word.length() + 1 &&
keyword.regionMatches(1, word, 0, word.length())) {
return true;
}
}
}
return false;