From b44c362af00ed2640be199658b94040572eb585e Mon Sep 17 00:00:00 2001 From: Chris Burel Date: Thu, 10 Feb 2022 12:50:56 -0800 Subject: [PATCH] Fix comparing an array in a conditional, which is always true Instead, check the intent of the original code, if the `szImg` string is not empty. Signed-off-by: Chris Burel --- .../Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp index 688db347da..3969a1bf13 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp @@ -596,7 +596,7 @@ namespace AZ { result = GetLastError(); } ULONGLONG fileVersion = 0; - if (szImg != NULL) + if (szImg[0]) // !szImg.empty() { // try to retrieve the file-version: VS_FIXEDFILEINFO* fInfo = NULL;