Skip to content

Commit

Permalink
Fix off-by-one error
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank committed Mar 5, 2024
1 parent c846a9a commit 8b1ba56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chatdbg/chatdbg_lldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def find_definition(filename: str, lineno: int, symbol: str) -> str:
character = lines[lineno - 1].find(symbol)
if character == -1:
return "Symbol not found at that location!"
definition = clangd.definition(filename, lineno, character)
definition = clangd.definition(filename, lineno - 1, character)
clangd.didClose(filename)

if "result" not in definition or not definition["result"]:
Expand Down

0 comments on commit 8b1ba56

Please sign in to comment.