Fixed wrong name determination in field-count value coupling
This commit is contained in:
@@ -216,8 +216,10 @@ namespace CodeGenerator {
|
|||||||
} else if (listFields.Select(f => f.Item2).Contains(field)) {
|
} else if (listFields.Select(f => f.Item2).Contains(field)) {
|
||||||
//update the size of the list attribute
|
//update the size of the list attribute
|
||||||
string fName = field.Name.ParseFName();
|
string fName = field.Name.ParseFName();
|
||||||
|
//retrieve the name of the list pointer
|
||||||
|
string listPointerName = listFields.First(f => f.Item2.Name.ParseFName() == fName).Item1.Name.ParseFName();
|
||||||
//Try seeing if the list attribute is already present
|
//Try seeing if the list attribute is already present
|
||||||
var x = ctd.Members.OfType<CodeMemberField>().FirstOrDefault(member => member.Name == fName);
|
var x = ctd.Members.OfType<CodeMemberField>().FirstOrDefault(member => member.Name.ParseFName() == listPointerName);
|
||||||
|
|
||||||
if (x != null) //Update the existing list attribute
|
if (x != null) //Update the existing list attribute
|
||||||
x.CustomAttributes[0].Arguments[5] = new(new CodePrimitiveExpression(totalSize));
|
x.CustomAttributes[0].Arguments[5] = new(new CodePrimitiveExpression(totalSize));
|
||||||
|
|||||||
Reference in New Issue
Block a user