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);
|
||||
break;
|
||||
case "count":
|
||||
d.Parameters[i].ComputeSize = node.Value.Trim();
|
||||
int count;
|
||||
if (Int32.TryParse(node.Value, out count))
|
||||
if (Int32.TryParse(d.Parameters[i].ComputeSize, out count))
|
||||
{
|
||||
d.Parameters[i].ElementCount = count;
|
||||
}
|
||||
else
|
||||
{
|
||||
d.Parameters[i].ElementCount = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue