Skip to content

Commit 9239afd

Browse files
committed
Simpler code.
1 parent c6a9f4b commit 9239afd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/Common/TypeDecoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static decimal DecodeDecimal(object value, int scale, int sqltype)
3333

3434
if (scale < 0)
3535
{
36-
divisor = (long)Math.Pow(10, scale * (-1));
36+
divisor = (long)Math.Pow(10, -scale);
3737
}
3838

3939
switch (sqltype & ~1)

Provider/src/FirebirdSql.Data.FirebirdClient/Common/TypeEncoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static object EncodeDecimal(decimal d, int scale, int sqltype)
3232

3333
if (scale < 0)
3434
{
35-
multiplier = (long)System.Math.Pow(10, scale * (-1));
35+
multiplier = (long)Math.Pow(10, -scale);
3636
}
3737

3838
switch (sqltype & ~1)

0 commit comments

Comments
 (0)