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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior of DataStream.Seek when SeekOrigin is End #177

Merged
merged 2 commits into from Jan 3, 2022

Conversation

Kaplas80
Copy link
Contributor

@Kaplas80 Kaplas80 commented Jan 3, 2022

Description

This is a breaking change

The method DataStream.Seek didn't behave like Stream.Seek when using SeekOrigin.End. Now, a negative offset will move the stream position towards the beginning of the stream.

Example

stream.Seek(-2, SeekOrigin.End); // move the stream position to length - 2

@pleonex pleonex self-requested a review January 3, 2022 15:29
@pleonex pleonex added the bug label Jan 3, 2022
@pleonex pleonex added this to the vNext milestone Jan 3, 2022
@pleonex pleonex added breaking and removed bug labels Jan 3, 2022
@pleonex pleonex changed the title Fix for DataStream.Seek Fix behavior of DataStream.Seek when SeekOrigin is End Jan 3, 2022
Copy link
Member

@pleonex pleonex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, you are right! Thanks!

@pleonex pleonex merged commit 3083cee into SceneGate:develop Jan 3, 2022
@Kaplas80 Kaplas80 deleted the fix/datastream-seek branch August 20, 2022 15:43
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.

None yet

2 participants