diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 9ab284e0..c022dbba 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -8,7 +8,7 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Debug + BUILD_TYPE: RelWithDebInfo jobs: testing-win: diff --git a/GViewCore/src/View/DissasmViewer/tests_dissasmviewer.cpp b/GViewCore/src/View/DissasmViewer/tests_dissasmviewer.cpp index bfa2f859..7da43f37 100644 --- a/GViewCore/src/View/DissasmViewer/tests_dissasmviewer.cpp +++ b/GViewCore/src/View/DissasmViewer/tests_dissasmviewer.cpp @@ -306,7 +306,8 @@ class DissasmTestInstance DissasmTestInstance(const unsigned char* binaryData, size_t binaryDataSize) { instance = nullptr; - assert(init(binaryData, binaryDataSize)); + const bool initResult = init(binaryData, binaryDataSize); + assert(init_result); } bool init(const unsigned char* binaryData, size_t binaryDataSize) @@ -345,7 +346,8 @@ class DissasmTestInstance initData.visibleRows = 53; initData.obj = obj; - assert(zone->InitZone(initData)); + const bool initZoneResult = zone->InitZone(initData); + assert(initZoneResult); } bool CheckInternalTypes(uint32 zoneIndex, std::initializer_list zones) diff --git a/GViewCore/src/View/DissasmViewer/x86_x64/DissasmX86.cpp b/GViewCore/src/View/DissasmViewer/x86_x64/DissasmX86.cpp index 43ea14cf..9c7a463d 100644 --- a/GViewCore/src/View/DissasmViewer/x86_x64/DissasmX86.cpp +++ b/GViewCore/src/View/DissasmViewer/x86_x64/DissasmX86.cpp @@ -819,7 +819,8 @@ bool Instance::DrawDissasmX86AndX64CodeZone(DrawLineInfo& dli, DissasmCodeZone* } DissasmAddColorsToInstruction(*asmCacheLine, chars, config, ColorMan.Colors, asmData, codePage, zone->cachedCodeOffsets[0].offset); std::string comment; - assert(asmCacheLine->parent); + if (!asmCacheLine->parent) + return false; if (asmCacheLine->parent && !asmCacheLine->parent->isCollapsed && asmCacheLine->parent->commentsData.GetComment(currentLine, comment)) { uint32 diffLine = zone->asmPreCacheData.maxLineSize + textTotalColumnLength + commentPaddingLength; if (config.ShowOnlyDissasm)