Fix bug where count overrides didn't effect ComputeSize
ComputeSize and ElementCount should match each other (and they do when read direct from XML spec files). However when using the override file to change count only ElementCount was effected. This is now fixed so that ComputeSize is set and also so that ElementCount gets reset to 0 if the count value isn't an integer.
This commit is contained in:
parent
8ed1e20a7a
commit
386d4e6a19
1 changed files with 6 additions and 1 deletions
|
@ -536,11 +536,16 @@ namespace Bind
|
||||||
d.Parameters[i].Flow = Parameter.GetFlowDirection((string)node.TypedValue);
|
d.Parameters[i].Flow = Parameter.GetFlowDirection((string)node.TypedValue);
|
||||||
break;
|
break;
|
||||||
case "count":
|
case "count":
|
||||||
|
d.Parameters[i].ComputeSize = node.Value.Trim();
|
||||||
int count;
|
int count;
|
||||||
if (Int32.TryParse(node.Value, out count))
|
if (Int32.TryParse(d.Parameters[i].ComputeSize, out count))
|
||||||
{
|
{
|
||||||
d.Parameters[i].ElementCount = count;
|
d.Parameters[i].ElementCount = count;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d.Parameters[i].ElementCount = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue