From 7542dabb71b51ff6bc97d77ef68a18737d1219a0 Mon Sep 17 00:00:00 2001 From: alexguirre Date: Sun, 3 Sep 2023 11:07:10 +0200 Subject: [PATCH] Escape ClipBase.Hash when writing XML Some YCDs have special characters in the clip hash, which causes the XML to be invalid. --- CodeWalker.Core/GameFiles/Resources/Clip.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeWalker.Core/GameFiles/Resources/Clip.cs b/CodeWalker.Core/GameFiles/Resources/Clip.cs index 4b404fa..ca35490 100644 --- a/CodeWalker.Core/GameFiles/Resources/Clip.cs +++ b/CodeWalker.Core/GameFiles/Resources/Clip.cs @@ -3151,7 +3151,7 @@ namespace CodeWalker.GameFiles public virtual void WriteXml(StringBuilder sb, int indent) { - YcdXml.StringTag(sb, indent, "Hash", YcdXml.HashString(Hash)); + YcdXml.StringTag(sb, indent, "Hash", MetaXml.XmlEscape(YcdXml.HashString(Hash))); YcdXml.StringTag(sb, indent, "Name", MetaXml.XmlEscape(Name)); YcdXml.ValueTag(sb, indent, "Type", Type.ToString()); YcdXml.ValueTag(sb, indent, "Unknown30", Unknown_30h.ToString());