Skip to content

Commit c91f7f4

Browse files
committed
Altering exists predicate ordering to be clearer.
1 parent 31324fc commit c91f7f4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class UnlikelyToBeAStringType extends Type {
4949
// see https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types
5050
class UnicodeMacroDependentWidthType extends Type {
5151
UnicodeMacroDependentWidthType() {
52-
exists(Type targ |
52+
exists(Type targ | getABaseType(this) = targ |
5353
targ.getName() in [
5454
"LPCTSTR",
5555
"LPTSTR",
@@ -58,8 +58,6 @@ class UnicodeMacroDependentWidthType extends Type {
5858
"TBYTE",
5959
"TCHAR"
6060
]
61-
|
62-
getABaseType(this) = targ
6361
)
6462
}
6563
}

0 commit comments

Comments
 (0)