Skip to content

Commit be442a6

Browse files
committed
Fixed creating copies of typedescription_t in DataMap.find()
1 parent 94052ba commit be442a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/modules/entities/entities_datamaps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ typedescription_t* DataMapSharedExt::find(datamap_t* pDataMap, const char *szNam
113113
{
114114
for (int iCurrentIndex=0; iCurrentIndex < pDataMap->dataNumFields; iCurrentIndex++)
115115
{
116-
typedescription_t pCurrentDataDesc = pDataMap->dataDesc[iCurrentIndex];
116+
typedescription_t& pCurrentDataDesc = pDataMap->dataDesc[iCurrentIndex];
117117
if ((pCurrentDataDesc.fieldName && strcmp(szName, pCurrentDataDesc.fieldName) == 0) ||
118118
(pCurrentDataDesc.externalName && strcmp(szName, pCurrentDataDesc.externalName) == 0))
119119
{

0 commit comments

Comments
 (0)