Util: Add extra safety check for custom asserts
This commit is contained in:
@@ -65,7 +65,9 @@ inline void __assertion_failed(const char* assertion, const char* file, uint32_t
|
||||
if constexpr (sizeof...(Parameters) > 0) {
|
||||
fprintf(stderr, ": ");
|
||||
// Cant use the formatting library to print asserts caused by the formatting library
|
||||
if (!std::string_view(function).starts_with("Util::Format::")) {
|
||||
std::string_view functionString = function;
|
||||
if (!functionString.starts_with("Util::Format::")
|
||||
&& !functionString.starts_with("Util::GenericLexer::")) {
|
||||
std::string message;
|
||||
formatTo(message, parameters...);
|
||||
fprintf(stderr, "%s", message.c_str());
|
||||
|
||||
Reference in New Issue
Block a user