Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix newPosition calculation in PositionStream method
Updated the PositionStream method in UsingMemoryStreamSlim.ReadWrite.cs to handle cases where maxPosition is zero. Previously, newPosition was assigned a random integer within the range of maxPosition, which could lead to errors when maxPosition was zero. Now, newPosition is set to zero if maxPosition is zero, ensuring correct behavior.
- Loading branch information