From 756ecdc898a414689f2f1e3c47c4b1c6d9558dc1 Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Thu, 11 Jul 2024 19:41:58 +0100 Subject: [PATCH] HPCC-32237 Fix getPlaneAttributeValue default value bug Signed-off-by: Jake Smith --- system/jlib/jfile.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/system/jlib/jfile.cpp b/system/jlib/jfile.cpp index e25bbac59e7..0d33fa28a1d 100644 --- a/system/jlib/jfile.cpp +++ b/system/jlib/jfile.cpp @@ -7961,9 +7961,12 @@ unsigned __int64 getPlaneAttributeValue(const char *planeName, PlaneAttributeTyp CriticalBlock b(planeAttriubuteMapCrit); auto it = planeAttributesMap.find(planeName); if (it != planeAttributesMap.end()) - return it->second[planeAttrType]; - else - return defaultValue; + { + unsigned v = it->second[planeAttrType]; + if (v) // a plane attribute value of 0 is considered as not set + return v; + } + return defaultValue; } size32_t getBlockedFileIOSize(const char *planeName, size32_t defaultSize)