From a4000f64972ab8caa1844440068b4d5e511f7e9a Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 8 Apr 2020 23:30:14 -0500 Subject: [PATCH] [ox/std] Fix assert for !OX_USE_STDLIB --- deps/ox/src/ox/std/assert.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deps/ox/src/ox/std/assert.cpp b/deps/ox/src/ox/std/assert.cpp index f20ec98a..57f7de06 100644 --- a/deps/ox/src/ox/std/assert.cpp +++ b/deps/ox/src/ox/std/assert.cpp @@ -34,6 +34,7 @@ void assertFunc([[maybe_unused]]const char *file, [[maybe_unused]]int line template<> void assertFunc(const char *file, int line, Error err, const char *assertMsg) { if (err) { +#if defined(OX_USE_STDLIB) std::cerr << "\033[31;1;1mASSERT FAILURE:\033[0m (" << file << ':' << line << "): " << assertMsg << '\n'; if (err.msg) { std::cerr << "\tError Message:\t" << err.msg << '\n'; @@ -45,6 +46,9 @@ void assertFunc(const char *file, int line, Error err, const char *assert printStackTrace(2); oxTrace("panic").del("") << "Panic: " << assertMsg << " (" << file << ":" << line << ")"; std::abort(); +#else + panic(file, line, assertMsg); +#endif } }