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

Deserialization of long.MinValue throws an OverflowException #673

Closed
Falco20019 opened this issue Feb 8, 2022 · 0 comments · Fixed by #702
Closed

Deserialization of long.MinValue throws an OverflowException #673

Falco20019 opened this issue Feb 8, 2022 · 0 comments · Fixed by #702
Labels

Comments

@Falco20019
Copy link

Falco20019 commented Feb 8, 2022

Describe the bug
Using the latest version (11.2.1), deserializing long.MinValue is not possible. I just tried to update from 8.1.2 where it still worked.

To Reproduce

var deserializer = new Deserializer();
deserializer.Deserialize<long>(long.MinValue.ToString());

This throws the following exception:

YamlDotNet.Core.YamlException : (Line: 1, Col: 1, Idx: 0) - (Line: 1, Col: 21, Idx: 20): Exception during deserialization
  ----> System.OverflowException : Arithmetic operation resulted in an overflow.

This seems to be originating from ScalarNodeDeserializer.DeserializeIntegerHelper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants