SceneGate / Yarhl

Framework for the implementation of format converters like game assets or media files
https://scenegate.github.io/Yarhl/
MIT License
59 stars 10 forks source link

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

Closed Kaplas80 closed 2 years ago

Kaplas80 commented 2 years ago

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