Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 695d4ff commit ed87f25Copy full SHA for ed87f25
1 file changed
cpp/ql/src/semmle/code/cpp/commons/Printf.qll
@@ -844,14 +844,10 @@ class FormatLiteral extends Literal {
844
*/
845
int getFormatArgumentIndexFor(int n, int mode) {
846
hasFormatArgumentIndexFor(n, mode) and
847
- result = count(int n2, int mode2 |
848
- hasFormatArgumentIndexFor(n2, mode2) and
849
- (
850
- n2 < n
851
- or
852
- n2 = n and
853
- mode2 < mode
854
- )
+ (3 * n) + mode = rank[result + 1](int n2, int mode2 |
+ hasFormatArgumentIndexFor(n2, mode2)
+ |
+ (3 * n2) + mode2
855
)
856
}
857
0 commit comments