From d28392f8fd9369abb37a021f0ed8c06a8049c851 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Wed, 4 Sep 2019 11:31:58 -0700 Subject: [PATCH] Fixed null function references showing as "" --- IDEHelper/WinDebugger.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/IDEHelper/WinDebugger.cpp b/IDEHelper/WinDebugger.cpp index aa7fe564..a1d19629 100644 --- a/IDEHelper/WinDebugger.cpp +++ b/IDEHelper/WinDebugger.cpp @@ -7551,6 +7551,9 @@ String WinDebugger::DbgTypedValueToString(const DbgTypedValue& origTypedValue, c ptrUseDataStr = ptrDataStr; } + bool isNull = wasPtr && (dataPtr == 0); + bool isBadSrc = !wasPtr && (dataPtr == 0); + if ((ptrVal == 0) && (dwValueType->IsTypedPrimitive())) { DbgTypedValue rawVal; @@ -7574,14 +7577,14 @@ String WinDebugger::DbgTypedValueToString(const DbgTypedValue& origTypedValue, c ptrDataStr = expr; ptrUseDataStr = expr; } + + // This keeps 'function' types from showing null as "" + isBadSrc = false; } else if ((ptrVal == 0) && (dwValueType->IsCompositeType())) { - } - - bool isNull = wasPtr && (dataPtr == 0); - bool isBadSrc = !wasPtr && (dataPtr == 0); + } DbgTypedValue useTypedValue = typedValue; if ((origHadRef) || ((typedValue.mType->HasPointer()) && (!dwUseType->HasPointer())))