File tree Expand file tree Collapse file tree
lib/semmle/code/cpp/regex Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -654,12 +654,12 @@ private module Impl implements RegexTreeViewSig {
654654
655655 /**
656656 * Gets the unicode char for this escape.
657- * E.g. for `\cA` this returns "a" .
657+ * E.g. for `\cA` this returns `0x01` .
658658 */
659659 private string getControl ( ) {
660660 this .isControl ( ) and
661661 exists ( string letter | letter = this .getText ( ) .suffix ( 2 ) .toUpperCase ( ) |
662- result = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" .indexOf ( letter ) .toUnicode ( )
662+ result = ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" .indexOf ( letter ) + 1 ) .toUnicode ( )
663663 )
664664 }
665665 }
Original file line number Diff line number Diff line change @@ -316,8 +316,8 @@ regExpNormalCharValue
316316| regexp.cpp:84:39:84:39 | f | f |
317317| regexp.cpp:90:19:90:24 | \\u0061 | a |
318318| regexp.cpp:93:19:93:22 | \\x61 | a |
319- | regexp.cpp:96:21:96:23 | \\cA | \u0000 |
320- | regexp.cpp:97:22:97:24 | \\cz | \u0019 |
319+ | regexp.cpp:96:21:96:23 | \\cA | \u0001 |
320+ | regexp.cpp:97:22:97:24 | \\cz | \u001a |
321321| regexp.cpp:100:20:100:21 | \\0 | \u0000 |
322322| regexp.cpp:101:21:101:22 | \\0 | \u0000 |
323323| regexp.cpp:104:21:104:21 | a | a |
You can’t perform that action at this time.
0 commit comments