From d839b83b6b28440ed166dd062b0d10a47e1d6323 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Tue, 4 Sep 2012 11:41:35 +0100 Subject: [PATCH] Fixed extraneous errors related to accessing nested props (bug 5446, r=me). --- core/HalfLife2.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/HalfLife2.cpp b/core/HalfLife2.cpp index 8065b2a2..794f1cd0 100644 --- a/core/HalfLife2.cpp +++ b/core/HalfLife2.cpp @@ -352,11 +352,16 @@ typedescription_t *UTIL_FindInDataMap(datamap_t *pMap, const char *name, bool *i { if (isNested) { - *isNested = true; - return NULL; + *isNested = (UTIL_FindInDataMap(pMap->dataDesc[i].td, name, NULL) != NULL); + if (*isNested) + { + return NULL; + } else { + continue; + } } else { // Use the old behaviour, we dont want to spring this on extensions - even if they're doing bad things. typedescription_t *_td; - if ((_td=UTIL_FindInDataMap(pMap->dataDesc[i].td, name, isNested)) != NULL) + if ((_td=UTIL_FindInDataMap(pMap->dataDesc[i].td, name, NULL)) != NULL) { return _td; }