Skip to content

Commit 8ade9ed

Browse files
committed
Python: fix inconsistency
Since we calculate the end column by offset, we must believ that the end line is the same as the start line.
1 parent db95ead commit 8ade9ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/ql/lib/semmle/python/regexp/RegexTreeView.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,9 @@ module Impl implements RegexTreeViewSig {
257257
) {
258258
not exists(this.getPart(_)) and
259259
exists(int re_start, int prefix_len | prefix_len = re.getPrefix().length() |
260-
re.getLocation().hasLocationInfo(filepath, startline, re_start, endline, _) and
260+
re.getLocation().hasLocationInfo(filepath, startline, re_start, _, _) and
261261
startcolumn = re_start + start + prefix_len and
262+
endline = startline and
262263
endcolumn = re_start + end + prefix_len - 1
263264
/* inclusive vs exclusive */
264265
)

0 commit comments

Comments
 (0)