Skip to content

Commit 64590de

Browse files
committed
Wrong decimal/numeric with scale 0 handling (DNET-1036).
1 parent 75dd020 commit 64590de

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
@@ -26,7 +26,7 @@ internal static class TypeDecoder
2626
{
2727
public static decimal DecodeDecimal(object value, int scale, int sqltype)
2828
{
29-
var shift = scale < 0 ? -scale : 1;
29+
var shift = scale < 0 ? -scale : scale;
3030

3131
switch (sqltype & ~1)
3232
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal static class TypeEncoder
2727
{
2828
public static object EncodeDecimal(decimal d, int scale, int sqltype)
2929
{
30-
var shift = scale < 0 ? -scale : 1;
30+
var shift = scale < 0 ? -scale : scale;
3131

3232
switch (sqltype & ~1)
3333
{

0 commit comments

Comments
 (0)