diff options
author | Maurice <maurice.henke@protonmail.com> | 2021-07-07 19:11:06 +0200 |
---|---|---|
committer | Maurice <maurice.henke@protonmail.com> | 2021-07-07 19:11:06 +0200 |
commit | 729e31eff4daa933ed10542dad3f8765a4cdc989 (patch) | |
tree | 2efe70c06fdb2626c1b6c3a37c598c0d4c0c1f45 | |
parent | 548d3b766094cb394c570da69c026d4366ccaa80 (diff) |
Prevent last line from being cleared as it is used for debug info
-rw-r--r-- | source/display/console.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/display/console.cpp b/source/display/console.cpp index 57655fc..411b524 100644 --- a/source/display/console.cpp +++ b/source/display/console.cpp @@ -216,8 +216,9 @@ namespace libtp::display // Load the console as a local pointer to avoid loading it each loop tp::jfw_system::SystemConsole* console = tp::jfw_system::systemConsole; - // If count is 0 we want to clear all lines - std::size_t linecount = sizeof( tp::jfw_system::SystemConsole::consoleLine ) / sizeof( tp::jfw_system::ConsoleLine ); + // If count is 0 we want to clear all lines; -1 because last line is debug info + std::size_t linecount = + sizeof( tp::jfw_system::SystemConsole::consoleLine ) / sizeof( tp::jfw_system::ConsoleLine ) - 1; if ( from > linecount ) { |