diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2024-06-10 08:24:39 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-06-10 08:26:53 +0900 |
commit | dfee7af57b0de51c0f1bb815da1be071978e8675 (patch) | |
tree | fe522e20b6daab9c8ee9a9a2243e2ad14c06c791 /src | |
parent | 9b0e2daf02410e956f4d9d41055753f786da3270 (diff) |
Fix #3846
Diffstat (limited to 'src')
-rw-r--r-- | src/result.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/result.go b/src/result.go index b9e737de..e1c20801 100644 --- a/src/result.go +++ b/src/result.go @@ -81,7 +81,7 @@ func buildResult(item *Item, offsets []Offset, score int) Result { if criterion == byBegin { val = util.AsUint16(minEnd - whitePrefixLen) } else { - val = util.AsUint16(math.MaxUint16 - math.MaxUint16*(maxEnd-whitePrefixLen)/int(item.TrimLength()+1)) + val = util.AsUint16(math.MaxUint16 - math.MaxUint16*(maxEnd-whitePrefixLen)/(int(item.TrimLength())+1)) } } } |