Browse Source

Fixed Command summary to tolerate null strings.

master
chrisgregan 10 years ago
parent
commit
c2fe21e95b
  1. 11
      Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs

11
Assets/Fungus/FungusScript/Editor/CommandListAdaptor.cs

@ -164,7 +164,16 @@ namespace Fungus
bool isComment = command.GetType() == typeof(Comment);
bool error = false;
string summary = command.GetSummary().Replace("\n", "").Replace("\r", "");
string summary = command.GetSummary();
if (summary == null)
{
summary = "";
}
else
{
summary = summary.Replace("\n", "").Replace("\r", "");
}
if (summary.Length > 80)
{
summary = summary.Substring(0, 80) + "...";

Loading…
Cancel
Save