Skip to content

Commit 8ddfbf4

Browse files
committed
Ten value
1 parent 4fbfdc4 commit 8ddfbf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Orm/Xtensive.Orm.SqlServer/Sql.Drivers.SqlServer/InternalHelpers.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ internal static class InternalHelpers
2727

2828
private static readonly UInt128 Max96bitValue = new(0xFFFFFFFFUL, ulong.MaxValue);
2929

30+
private static readonly UInt128 Ten = 10;
31+
3032
/// <summary>
3133
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
3234
/// directly from your code. This API may change or be removed in future releases.
@@ -178,7 +180,7 @@ internal static decimal TruncateToNetDecimal(SqlDecimal sqlDecimal)
178180
}
179181

180182
for (; realScale > 0 && data > Max96bitValue; realScale--) {
181-
(data, _) = UInt128.DivRem(data, 10);
183+
(data, _) = UInt128.DivRem(data, Ten);
182184
}
183185

184186
if (data > Max96bitValue) {

0 commit comments

Comments
 (0)