From f644396a15582c2e74c2b4e4960ef058f9b76972 Mon Sep 17 00:00:00 2001 From: sk-zk Date: Fri, 30 Oct 2020 23:08:06 +0100 Subject: [PATCH] Fix \0 chars in TextAssets cutting off preview --- AssetStudioGUI/AssetStudioGUIForm.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AssetStudioGUI/AssetStudioGUIForm.cs b/AssetStudioGUI/AssetStudioGUIForm.cs index 36d059b..cd26b46 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.cs @@ -926,7 +926,8 @@ namespace AssetStudioGUI private void PreviewTextAsset(TextAsset m_TextAsset) { var text = Encoding.UTF8.GetString(m_TextAsset.m_Script); - PreviewText(text.Replace("\n", "\r\n")); + text = text.Replace("\n", "\r\n").Replace("\0", ""); + PreviewText(text); } private void PreviewMonoBehaviour(MonoBehaviour m_MonoBehaviour)