Skip to content

Commit a501f81

Browse files
committed
Manipulate raw param value in ToString
1 parent 145ef89 commit a501f81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

KuruExtract/RV/Config/Params/Raw/RawValue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public RawValue(RVBinaryReader input, ValueType type)
4040
Type = type;
4141
Value = Type switch
4242
{
43-
ValueType.Expression or ValueType.String => input.ReadAsciiz().Replace("\"", "\"\""),
43+
ValueType.Expression or ValueType.String => input.ReadAsciiz(),
4444
ValueType.Float => input.ReadSingle(),
4545
ValueType.Int => input.ReadInt32(),
4646
ValueType.Int64 => input.ReadInt64(),
@@ -52,7 +52,7 @@ public RawValue(RVBinaryReader input, ValueType type)
5252
public override string? ToString()
5353
{
5454
if (Type == ValueType.Expression || Type == ValueType.String)
55-
return $"\"{Value}\"";
55+
return $"\"{((string)Value).Replace("\"", "\"\"")}\"";
5656

5757
if (Type == ValueType.Float)
5858
return ((float)Value).ToString(CultureInfo.InvariantCulture);

0 commit comments

Comments
 (0)