Skip to content

Commit

Permalink
Simplify data_end calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemk14ebr committed Aug 19, 2024
1 parent 1b96965 commit 8f2d56b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion objfile/patterns.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func FindRegex(data []byte, regexInfo *RegexAndNeedle) []int {
for _, needleMatch := range needleMatches {
// adjust the window to the pattern start and end
data_start := needleMatch - regexInfo.needleOffset
data_end := needleMatch + regexInfo.len - regexInfo.needleOffset
data_end := data_start + regexInfo.len
if data_start >= data_len {
continue
}
Expand Down

0 comments on commit 8f2d56b

Please sign in to comment.