Skip to content

Commit

Permalink
try fix by.add decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed May 4, 2024
1 parent 52b0c18 commit 941976a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/by/By.Add.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;

Expand Down Expand Up @@ -108,8 +109,7 @@ public void Add<T>(T value)
}
case Types.Decimal:
{
// TODO: create own implementation to be 100% precise
buffer.AddRange(BitConverter.GetBytes(Decimal.ToOACurrency((decimal)data)));
Decimal.GetBits((decimal)data).ToList().ForEach(x => buffer.AddRange(BitConverter.GetBytes(x)));
break;
}
case Types.DateTime:
Expand Down

0 comments on commit 941976a

Please sign in to comment.