From 8a0ef921007a41763fcd698da7f9f3ec1aef7037 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Tue, 31 Dec 2019 14:41:08 +1300 Subject: [PATCH] Crash: Woops! Remove a misplaced if (true) I was testing with this and must have forgotten to remove it :( --- Userland/crash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/crash.cpp b/Userland/crash.cpp index 09c8554260..8666fa6fb4 100644 --- a/Userland/crash.cpp +++ b/Userland/crash.cpp @@ -189,7 +189,7 @@ int main(int argc, char** argv) if (mode == ReadFromFreedMemory || mode == TestAllCrashTypes) { Crash("Read from freed memory", []() { auto* uninitialized_memory = (volatile u32**)malloc(1024); - if (true) + if (!uninitialized_memory) return Crash::Failure::UnexpectedError; free(uninitialized_memory);