Skip to content

Commit

Permalink
fix: changing iterator value in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2000 committed Jul 2, 2024
1 parent 6d95ae6 commit c235a1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 3 additions & 6 deletions src/Ubiety.Stringprep.Core/Ubiety.Stringprep.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<TargetFrameworks>net8.0</TargetFrameworks>
<LangVersion>default</LangVersion>
<AnalysisLevel>latest</AnalysisLevel>
<DocumentationFile>Ubiety.Stringprep.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup>
<PackageIcon>icon128.png</PackageIcon>
<Description>Stringprep library implementing RFC3454</Description>
Expand All @@ -16,15 +17,11 @@
<RepositoryUrl>https://github.com/ubiety/Ubiety.StringPrep.Core/</RepositoryUrl>
<PackageTags>ubiety;stringprep;dotnet</PackageTags>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\icon128.png" Pack="true" PackagePath="\" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>Ubiety.Stringprep.Core.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
Expand Down
8 changes: 4 additions & 4 deletions src/Ubiety.Stringprep.Core/ValueRangeCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ private static List<int> DoRemove(List<int> list, IList<int> removals)
{
if (removals[i] == list[j] || (removals[i] < list[j] && (i == 0 || removals[i] > list[j - 1])))
{
list.RemoveAt(j--);
CloseRemove(list, removals, ref i, ref j);
list.RemoveAt(j - 1);
CloseRemove(list, removals, ref i, ref j - 1);
}
else if (removals[i] > list[j] && removals[i] < list[j + 1])
{
list.Insert(++j, removals[i] - 1);
CloseRemove(list, removals, ref i, ref j);
list.Insert(j + 1, removals[i] - 1);
CloseRemove(list, removals, ref i, ref j + 1);
}
}
}
Expand Down

0 comments on commit c235a1e

Please sign in to comment.