Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Comparing stream to itself returns false #199

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

pleonex
Copy link
Member

@pleonex pleonex commented Nov 24, 2023

DataStream.Compare with the same object was returning that the stream was not identical. We were not detecting that it's the same instance and trying to read twice from the same object.

This PR closes #189

Quality check list

  • Related code has been tested automatically or manually
  • Related documentation is updated
  • I acknowledge I have read and filled this checklist and accept the
    developer certificate of origin

Acceptance criteria

  • Compare method to itself returns true

Follow-up work

None

Example

using var stream1 = new DataStream();
stream1.WriteByte(0xCA);
DataStream stream2 = stream1;
Assert.IsTrue(stream1.Compare(stream2))

@pleonex pleonex added the bug label Nov 24, 2023
@pleonex pleonex added this to the v4.0 milestone Nov 24, 2023
@pleonex pleonex self-assigned this Nov 24, 2023
@pleonex pleonex merged commit bf67ed3 into develop Nov 24, 2023
5 checks passed
@pleonex pleonex deleted the feature/189-compare-itself branch November 24, 2023 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataStream.Compare with itself doesn't work properly
1 participant