Fixed, Find and Replace mode: fixed an exception when trying to assemble search result label for a named script without arguments.

This commit is contained in:
MaxED 2016-05-10 18:36:38 +00:00 committed by spherallic
parent 4b91a6d76b
commit 0bb92f99cb
2 changed files with 14 additions and 2 deletions

View file

@ -223,7 +223,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(Array.IndexOf(GZGeneral.ACS_SPECIALS, l.Action) != -1)
{
string s = l.Fields.GetValue("arg0str", string.Empty);
if(!string.IsNullOrEmpty(s)) argslist[0] = "\"" + s + "\"";
if(!string.IsNullOrEmpty(s))
{
if(argslist.Count > 0)
argslist[0] = "\"" + s + "\"";
else
argslist.Add("\"" + s + "\"");
}
}
// Create args string

View file

@ -227,7 +227,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(Array.IndexOf(GZGeneral.ACS_SPECIALS, t.Action) != -1)
{
string s = t.Fields.GetValue("arg0str", string.Empty);
if(!string.IsNullOrEmpty(s)) argslist[0] = "\"" + s + "\"";
if(!string.IsNullOrEmpty(s))
{
if(argslist.Count > 0)
argslist[0] = "\"" + s + "\"";
else
argslist.Add("\"" + s + "\"");
}
}
// Create args string