Skip to content

Commit

Permalink
Corrected size of allocated memory for field name in NcCompoundType::…
Browse files Browse the repository at this point in the history
…getMemberName
  • Loading branch information
jarlela committed Apr 25, 2015
1 parent ba6e2c8 commit d5ec1b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cxx4/ncCompoundType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ NcType NcCompoundType::getMember(int memberIndex) const
// Returns name of member field.
std::string NcCompoundType::getMemberName(int memberIndex) const
{
char fieldName[NC_MAX_NAME];
char fieldName[NC_MAX_NAME+1];
ncCheck(nc_inq_compound_fieldname(groupId,myId,memberIndex, fieldName),__FILE__,__LINE__);
return std::string(fieldName);
}
Expand Down

0 comments on commit d5ec1b8

Please sign in to comment.