Fix To Prevent from Crash

This commit is contained in:
tobid7 2022-11-14 18:25:24 +01:00
parent 62fa5ede9d
commit bbbfd60bb7

View File

@ -13,5 +13,12 @@ StealConsole::~StealConsole() {
// Do Nothing Here
}
std::string StealConsole::GetStdout() { return this->stolen_stdout.str(); }
std::string StealConsole::GetStdout() {
if (this->stolen_stdout.str().length() < 400) {
return this->stolen_stdout.str();
} else {
return this->stolen_stdout.str().substr(stolen_stdout.str().length() - 400);
}
return "";
}
} // namespace RenderD7