Skip to content

Commit

Permalink
Merge pull request #208 from AlvinRey/FixIpv4
Browse files Browse the repository at this point in the history
Fix Ipv4
  • Loading branch information
rabbitism authored Apr 6, 2024
2 parents e5339a4 + fc2f859 commit f8a11b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ursa/Controls/IPv4Box.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ protected override void OnTextInput(TextInputEventArgs e)
if (!char.IsNumber(s![0])) return;
if (_currentActivePresenter != null)
{
int index = _currentActivePresenter.CaretIndex;
int index = Math.Min(_currentActivePresenter.CaretIndex, _currentActivePresenter.Text.Length);
string? oldText = _currentActivePresenter.Text;
if (oldText is null)
{
Expand Down

0 comments on commit f8a11b0

Please sign in to comment.