From 2440d0a772e6e60e3948351b4c7239621a4058f5 Mon Sep 17 00:00:00 2001 From: Davide Palladino Date: Mon, 9 Dec 2024 12:02:25 +0100 Subject: [PATCH] Fixed frown value for `padEnd` --- .../src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt index d1ab3cedd..9d3fefc0c 100644 --- a/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt +++ b/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/coercing.kt @@ -170,7 +170,7 @@ private fun coerceString(value: StringValue, type: Type): Value { if (value.isBlank()) { type.blank() } else { - DataStructValue(value.value.padEnd(6)) + DataStructValue(value.value.padEnd(type.elementSize)) } } is CharacterType -> {