diff --git a/src/Soil-Serializer-Tests/SoilPrimitiveSerializationTest.class.st b/src/Soil-Serializer-Tests/SoilPrimitiveSerializationTest.class.st index ed3e2ed5..0730f183 100644 --- a/src/Soil-Serializer-Tests/SoilPrimitiveSerializationTest.class.st +++ b/src/Soil-Serializer-Tests/SoilPrimitiveSerializationTest.class.st @@ -513,7 +513,7 @@ SoilPrimitiveSerializationTest >> testSerializationScaledDecimal [ serialized := SoilSerializer serializeToBytes: object. self assert: (serialized at: 1) equals: TypeCodeScaledDecimal. - self assert: serialized equals: #[9 10 1 2]. + self assert: serialized equals: #[9 5 10 1 2]. materialized := SoilMaterializer materializeFromBytes: serialized. self assert: materialized class equals: ScaledDecimal. self assert: materialized equals: object diff --git a/src/Soil-Serializer/SoilBasicMaterializer.class.st b/src/Soil-Serializer/SoilBasicMaterializer.class.st index 545b9901..c70561c9 100644 --- a/src/Soil-Serializer/SoilBasicMaterializer.class.st +++ b/src/Soil-Serializer/SoilBasicMaterializer.class.st @@ -104,7 +104,7 @@ SoilBasicMaterializer >> nextScaledDecimal: aClass [ | scaledDecimal | scaledDecimal := aClass new - setNumerator: self nextLengthEncodedInteger + setNumerator: self nextSoilObject denominator: self nextLengthEncodedInteger scale: self nextLengthEncodedInteger. self registerObject: scaledDecimal. diff --git a/src/Soil-Serializer/SoilBasicSerializer.class.st b/src/Soil-Serializer/SoilBasicSerializer.class.st index 31d8d815..f008ab62 100644 --- a/src/Soil-Serializer/SoilBasicSerializer.class.st +++ b/src/Soil-Serializer/SoilBasicSerializer.class.st @@ -121,7 +121,7 @@ SoilBasicSerializer >> nextPutScaledDecimal: aNumber [ "we know that numerator, denominator and scale are SmallIntegers" self nextPutByte: TypeCodeScaledDecimal; - nextPutLengthEncodedInteger: aNumber numerator; + nextPutInteger: aNumber numerator; nextPutLengthEncodedInteger: aNumber denominator; nextPutLengthEncodedInteger: aNumber scale ]