From 7eb04f8c32d552ec7faee7dcebf35e1f63e68bb6 Mon Sep 17 00:00:00 2001 From: tiferet Date: Wed, 30 Nov 2022 15:58:51 -0800 Subject: [PATCH] Bug fix --- .../experimental/adaptivethreatmodeling/EndpointFeatures.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll b/javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll index da330fb5c75..ba37a7a8ee8 100644 --- a/javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll +++ b/javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll @@ -261,13 +261,13 @@ class CodexPrompt extends EndpointFeature, TCodexPrompt { this.tokenize(any(Location location | location.getFile() = node.getAstNode().getLocation().getFile() and location.getStartLine() = - min(int line | + max(int line | line = node.getAstNode().getLocation().getStartLine() - neighborhoodSize or line = 1 | line ) and location.getEndLine() = - max(int line | + min(int line | line = node.getAstNode().getLocation().getEndLine() + neighborhoodSize + 1 or // Add 1 because the end column is 1 line = location.getFile().getNumberOfLines() |