Replace the empty defaults caused by a null default with nil

This commit is contained in:
Thijs Waalen
2014-09-08 21:59:58 +02:00
parent c204e185bc
commit 2da4a53155

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Scripting
{
var ret = "{0} {1}".F(pi.ParameterType.LuaDocString(), pi.Name);
if (pi.IsOptional)
ret += " = {0}".F(pi.DefaultValue);
ret += " = {0}".F(pi.DefaultValue != null ? pi.DefaultValue : "nil");
return ret;
}