Skip to content

Commit

Permalink
fix: check non-nil before accessing as integer
Browse files Browse the repository at this point in the history
  • Loading branch information
monaqa committed Oct 5, 2023
1 parent 611cf5e commit 5fa5af0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/dial/augend/decimal_fraction.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function AugendDecimalFraction:find(line, cursor)
end
idx = idx_frac_end + 1
-- decimal fraction before the cursor
if idx_frac_end < cursor then
if cursor ~= nil and idx_frac_end < cursor then
return -- continue while loop
end

Expand Down

0 comments on commit 5fa5af0

Please sign in to comment.