Commit 060a5cc1 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Added guard to prevent (theoretical) out of bound access

parent 2937e442
...@@ -2158,7 +2158,8 @@ static void writeMemberList(OutputList &ol,bool useSections,int page, ...@@ -2158,7 +2158,8 @@ static void writeMemberList(OutputList &ol,bool useSections,int page,
const LetterToIndexMap<MemberIndexList> &memberLists, const LetterToIndexMap<MemberIndexList> &memberLists,
DefinitionIntf::DefType type) DefinitionIntf::DefType type)
{ {
ASSERT((int)type<3); int index = (int)type;
ASSERT(index<3);
typedef void (*writeLinkForMember_t)(OutputList &ol,MemberDef *md,const char *separator, typedef void (*writeLinkForMember_t)(OutputList &ol,MemberDef *md,const char *separator,
QCString &prevNamespaceName); QCString &prevNamespaceName);
...@@ -2238,8 +2239,11 @@ static void writeMemberList(OutputList &ol,bool useSections,int page, ...@@ -2238,8 +2239,11 @@ static void writeMemberList(OutputList &ol,bool useSections,int page,
sep = ", "; sep = ", ";
// link to class for other members with the same name // link to class for other members with the same name
} }
// write the link for the specific list type if (index<3)
writeLinkForMemberMap[(int)type](ol,md,sep,prevDefName); {
// write the link for the specific list type
writeLinkForMemberMap[index](ol,md,sep,prevDefName);
}
} }
} }
if (!firstItem) ol.endItemListItem(); if (!firstItem) ol.endItemListItem();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment