From 06db4bbee9253929b08c14c0d52c6a6ad3eb5bfe Mon Sep 17 00:00:00 2001 From: Stephan Renatus Date: Tue, 1 Oct 2024 12:26:08 +0200 Subject: [PATCH] internal/lsp/hover: "fix" codeql finding (#1156) Signed-off-by: Stephan Renatus --- internal/lsp/hover/hover.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/lsp/hover/hover.go b/internal/lsp/hover/hover.go index 4d9d5be5..6794b0e1 100644 --- a/internal/lsp/hover/hover.go +++ b/internal/lsp/hover/hover.go @@ -178,12 +178,12 @@ func UpdateKeywordLocations(ctx context.Context, cache *cache.Cache, uri string) keywordLocations := make(map[uint][]types2.KeywordLocation) for line, uses := range keywords { - lineNumber64, err := strconv.ParseUint(line, 10, 64) + lineNumber32, err := strconv.ParseUint(line, 10, 32) if err != nil { return fmt.Errorf("failed to parse line number: %w", err) } - lineNumber := uint(lineNumber64) + lineNumber := uint(lineNumber32) for _, use := range uses { keywordLocations[lineNumber] = append(keywordLocations[lineNumber], types2.KeywordLocation{