diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-16 23:42:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 23:42:44 +0200 |
commit | 4fb5b1a21186bfc96aaa724e8e19afb44332dd8b (patch) | |
tree | e74d9f2f3cdabebf67ac253fdf2877f348df35c1 /core/script_debugger_remote.cpp | |
parent | bc659323b7b130b75d61b1476383b2ad2c313ea6 (diff) | |
parent | d645b80e468da7c8dcf8d55aec96f860dd64eaec (diff) |
Merge pull request #12161 from RandomShaper/fix-log-overflow
Fix formatting of debug log overflow
Diffstat (limited to 'core/script_debugger_remote.cpp')
-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(); } |