Skip to content

Commit

Permalink
Use WriteDoubleLittleEndian in NumericGraphemeInfo (#112611)
Browse files Browse the repository at this point in the history
  • Loading branch information
xtqqczze authored Mar 4, 2025
1 parent 75e7800 commit 9f3c32d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public static byte[] ToDigitBytes(NumericGraphemeInfo input)
public static byte[] ToNumericBytes(NumericGraphemeInfo input)
{
byte[] bytes = new byte[sizeof(double)];
double value = input._data.numericValue;
BinaryPrimitives.WriteUInt64LittleEndian(bytes, Unsafe.As<double, ulong>(ref value));
BinaryPrimitives.WriteDoubleLittleEndian(bytes, input._data.numericValue);
return bytes;
}

Expand Down

0 comments on commit 9f3c32d

Please sign in to comment.