File tree 1 file changed +4
-3
lines changed 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,7 @@ func EncodeStringToBCD(buf string) ([]byte, error) {
90
90
c = - 1
91
91
}
92
92
93
- // nibbleIdx is an index of a current nibble in a byte buffer. The first
94
- // nibble should contain 0, if the decimal number has an even number of
95
- // digits.
93
+ // nibbleIdx is an index of a current nibble in a byte buffer.
96
94
nibbleIdx := 0
97
95
scale := 0 // By default decimal number is integer.
98
96
var byteBuf []byte
@@ -146,6 +144,9 @@ func EncodeStringToBCD(buf string) ([]byte, error) {
146
144
lowByte := len (byteBuf ) - 1
147
145
byteBuf [lowByte ] = byteBuf [lowByte ] | mapRuneToByteSign [sign ]
148
146
}
147
+
148
+ // The first nibble should contain 0, if the decimal number has an even
149
+ // number of digits.
149
150
byteScale := byte (scale )
150
151
if c % 2 == 0 {
151
152
byteScale = byteScale << 4
You can’t perform that action at this time.
0 commit comments