diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-10-16 22:10:11 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-10-16 22:10:11 +0200 |
commit | d645b80e468da7c8dcf8d55aec96f860dd64eaec (patch) | |
tree | a15642763b323042c1fbe7b92704c76a73fb1fe5 /core | |
parent | 8de1dc7e9a1d137d9904122e775c270b03f4e049 (diff) |
Fix formatting of debug log overflow
Fixes #12087.
Diffstat (limited to 'core')
-rw-r--r-- | core/script_debugger_remote.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 4653ade294..2feb068ecb 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -855,15 +855,19 @@ void ScriptDebuggerRemote::_print_handler(void *p_this, const String &p_string) } sdr->char_count += allowed_chars; - - if (sdr->char_count >= sdr->max_cps) { - s += "\n[output overflow, print less text!]\n"; - } + bool overflowed = sdr->char_count >= sdr->max_cps; sdr->mutex->lock(); if (!sdr->locking && sdr->tcp_client->is_connected_to_host()) { + if (overflowed) + s += "[...]"; + sdr->output_strings.push_back(s); + + if (overflowed) { + sdr->output_strings.push_back("[output overflow, print less text!]"); + } } sdr->mutex->unlock(); } |