Skip to content

Commit 850a1d5

Browse files
authored
Fix regex for octal literal matching
1 parent 1f363fe commit 850a1d5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cpp/common/src/codingstandards/cpp/Cpp14Literal.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module Cpp14Literal {
4949
* Octal literals must always start with the digit `0`.
5050
*/
5151
class OctalLiteral extends IntegerLiteral, RecognizedNumericLiteral {
52-
OctalLiteral() { getValueText().regexpMatch("\\s*0[0-7']*[uUlL]*\\s*") }
52+
OctalLiteral() { getValueText().regexpMatch("\\s*0[0-7']+[uUlL]*\\s*") }
5353

5454
override string getAPrimaryQlClass() { result = "OctalLiteral" }
5555
}

0 commit comments

Comments
 (0)