mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
Merge pull request #639 from sk-zk/nul-fix
[GUI] Fix \0 chars in TextAssets cutting off preview
This commit is contained in:
commit
6f7b77245d
@ -934,7 +934,8 @@ namespace AssetStudioGUI
|
|||||||
private void PreviewTextAsset(TextAsset m_TextAsset)
|
private void PreviewTextAsset(TextAsset m_TextAsset)
|
||||||
{
|
{
|
||||||
var text = Encoding.UTF8.GetString(m_TextAsset.m_Script);
|
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)
|
private void PreviewMonoBehaviour(MonoBehaviour m_MonoBehaviour)
|
||||||
|
Loading…
Reference in New Issue
Block a user