Skip to content

Reading of Decimal broken for binary XmlDictionaryReader #73934

Closed
@Daniel-Svensson

Description

@Daniel-Svensson

Description

 #71752 introduced 2 bugs for reading of decimal values from binary xml

  1. It forget to call Advance
  2. it reads the bytes in incorrect order resulting in either the wrong decimal value being read or an exception being thrown.

A fix for both bugs can be found in #73332 since that PR already had the necessary test added to detect the 2nd bug.

Reproduction Steps

See test in #73332
Or just try to roundtrip a decimal directly using XmlDictionaryWriter XmlDictionaryReader

Expected behavior

The reader should properly read decimal values the same as in previous releases.

Actual behavior

Code will throw or return the wrong result

Regression?

Yes, worked in net framework and up to net7 preview.7

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions