You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-06 17:25:19 +00:00
Fix formatting of debug log overflow
Fixes #12087.
(cherry picked from commit d645b80e46)
This commit is contained in:
@@ -1069,15 +1069,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()) {
|
||||
|
||||
if (overflowed)
|
||||
s += "[...]";
|
||||
|
||||
sdr->output_strings.push_back(s);
|
||||
|
||||
if (overflowed) {
|
||||
sdr->output_strings.push_back("[output overflow, print less text!]");
|
||||
}
|
||||
}
|
||||
sdr->mutex->unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user