Skip to content

Commit

Permalink
further corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
WaynePhillipsEA committed Jan 14, 2018
1 parent b52e0d9 commit d722ce3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rubberduck.Parsing/ComReflection/ComEnumerationMember.cs
Expand Up @@ -20,7 +20,7 @@ public ComEnumerationMember(ITypeInfo info, VARDESC varDesc)

var names = new string[1];
int count;
info.GetNames(varDesc.memid, names, 1, out count);
info.GetNames(varDesc.memid, names, names.Length, out count);
Debug.Assert(count == 1);
Name = names[0];
}
Expand Down
2 changes: 1 addition & 1 deletion Rubberduck.Parsing/ComReflection/ComMember.cs
Expand Up @@ -85,7 +85,7 @@ private void LoadParameters(FUNCDESC funcDesc, ITypeInfo info)
Parameters = new List<ComParameter>();
var names = new string[255];
int count;
info.GetNames(Index, names, 255, out count);
info.GetNames(Index, names, names.Length, out count);

for (var index = 0; index < count - 1; index++)
{
Expand Down
2 changes: 1 addition & 1 deletion Rubberduck.Parsing/ComReflection/ComModule.cs
Expand Up @@ -59,7 +59,7 @@ private void GetComFields(ITypeInfo info, TYPEATTR attrib)
info.GetVarDesc(index, out varPtr);
var desc = (VARDESC)Marshal.PtrToStructure(varPtr, typeof(VARDESC));
int length;
info.GetNames(desc.memid, names, 1, out length);
info.GetNames(desc.memid, names, names.Length, out length);
Debug.Assert(length == 1);

_fields.Add(new ComField(names[0], desc, index, DeclarationType.Constant));
Expand Down
2 changes: 1 addition & 1 deletion Rubberduck.Parsing/ComReflection/ComStruct.cs
Expand Up @@ -34,7 +34,7 @@ private void GetFields(ITypeInfo info, TYPEATTR attrib)
info.GetVarDesc(index, out varPtr);
var desc = (VARDESC)Marshal.PtrToStructure(varPtr, typeof(VARDESC));
int length;
info.GetNames(desc.memid, names, 1, out length);
info.GetNames(desc.memid, names, names.Length, out length);
Debug.Assert(length == 1);

_fields.Add(new ComField(names[0], desc, index, DeclarationType.UserDefinedTypeMember));
Expand Down

0 comments on commit d722ce3

Please sign in to comment.