Skip to content

Commit

Permalink
Avoid downcasting to Int32 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakimych committed Mar 19, 2024
1 parent a85e9c6 commit 3897ba2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Combination.StringPools/Utf8StringPool.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;

Expand Down Expand Up @@ -153,7 +153,7 @@ private PooledUtf8String AddInternal(ReadOnlySpan<byte> value)
else
{
++currentPageIndex;
writePosition = (currentPageIndex * pageSize) + structLength;
writePosition = (currentPageIndex * (long)pageSize) + structLength;
didAlloc = EnsureCapacity(currentPageIndex + 1);
writePtr = pages[currentPageIndex];
pageStartOffset = 0;
Expand Down

0 comments on commit 3897ba2

Please sign in to comment.