Skip to content

Commit 5449bdc

Browse files
committed
Swift: Do regex locations more like Ruby does them.
1 parent 5a99007 commit 5449bdc

File tree

2 files changed

+2114
-2114
lines changed

2 files changed

+2114
-2114
lines changed

swift/ql/lib/codeql/swift/regex/RegexTreeView.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ private module Impl implements RegexTreeViewSig {
213213
) {
214214
filepath = re.getFile().getAbsolutePath() and
215215
startline = re.getLocation().getStartLine() and
216-
startcolumn = re.getLocation().getStartColumn() and
216+
startcolumn = re.getLocation().getStartColumn() + start + 1 and
217217
endline = re.getLocation().getEndLine() and
218-
endcolumn = re.getLocation().getEndColumn()
218+
endcolumn = re.getLocation().getStartColumn() + end - 1
219219
}
220220

221221
/** Gets the file in which this term is found. */

0 commit comments

Comments
 (0)