On -disable-assert, panic will still work but not print the caller location

This commit is contained in:
gingerBill
2023-10-25 11:34:09 +01:00
parent 5a771732bd
commit f3f0ab6e2c
2 changed files with 4 additions and 3 deletions
+4 -2
View File
@@ -664,8 +664,10 @@ default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code
when ODIN_OS == .Freestanding {
// Do nothing
} else {
print_caller_location(loc)
print_string(" ")
when !ODIN_DISABLE_ASSERT {
print_caller_location(loc)
print_string(" ")
}
print_string(prefix)
if len(message) > 0 {
print_string(": ")