Merge pull request #639 from sk-zk/nul-fix

[GUI] Fix \0 chars in TextAssets cutting off preview
This commit is contained in:
Perfare 2021-04-18 01:21:16 +08:00 committed by GitHub
commit 6f7b77245d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -934,7 +934,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)