1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Add fflush to error macros

CRASH_NOW and DEV_ASSERT macros would previously terminate before outputting any error messages.
This PR ensures calling fflush for stdout before terminating.

(cherry picked from commit ee979d321a)
This commit is contained in:
lawnjelly
2022-02-05 12:38:57 +00:00
committed by Rémi Verschelde
parent 4ab57389a5
commit 718132b694
2 changed files with 8 additions and 0 deletions

View File

@@ -107,3 +107,7 @@ void _err_print_index_error(const char *p_function, const char *p_file, int p_li
void _err_print_index_error(const char *p_function, const char *p_file, int p_line, int64_t p_index, int64_t p_size, const char *p_index_str, const char *p_size_str, const String &p_message, bool fatal) {
_err_print_index_error(p_function, p_file, p_line, p_index, p_size, p_index_str, p_size_str, p_message.utf8().get_data(), fatal);
}
void _err_flush_stdout() {
fflush(stdout);
}