diff --git a/cpp/ql/src/JPL_C/LOC-4/Rule 20/PreprocessorUsePartial.ql b/cpp/ql/src/JPL_C/LOC-4/Rule 20/PreprocessorUsePartial.ql index eed90414eb3..376f50962d6 100644 --- a/cpp/ql/src/JPL_C/LOC-4/Rule 20/PreprocessorUsePartial.ql +++ b/cpp/ql/src/JPL_C/LOC-4/Rule 20/PreprocessorUsePartial.ql @@ -12,7 +12,7 @@ import cpp predicate incomplete(Macro m) { - exists(string body | body = m.getBody() and not m.getBody().matches("%\\") | + exists(string body | body = m.getBody() and not m.getBody().matches("%\\\\") | body.regexpMatch("[^(]*\\).*") or body.regexpMatch("[^\\[]*].*") or body.regexpMatch("[^{]*}.*") or diff --git a/cpp/ql/src/Power of 10/Rule 8/PartialMacro.ql b/cpp/ql/src/Power of 10/Rule 8/PartialMacro.ql index 2598118805c..7abc0b2f669 100644 --- a/cpp/ql/src/Power of 10/Rule 8/PartialMacro.ql +++ b/cpp/ql/src/Power of 10/Rule 8/PartialMacro.ql @@ -12,7 +12,7 @@ import cpp predicate incomplete(Macro m) { - exists(string body | body = m.getBody() and not m.getBody().matches("%\\") | + exists(string body | body = m.getBody() and not m.getBody().matches("%\\\\") | body.regexpMatch("[^(]*\\).*") or body.regexpMatch("[^\\[]*].*") or body.regexpMatch("[^{]*}.*") or