Fix crashing when port checking, remove debug prints

This commit is contained in:
Lion Kortlepel 2020-11-09 23:34:06 +01:00
parent 01e02edf8c
commit 2d11841a68
2 changed files with 1 additions and 5 deletions

View File

@ -140,7 +140,7 @@ static void ProcessCompositeInput() {
if (CompositeInput.size() == 2 && memcmp(CompositeInput.data(), std::array<char, 2> { 91, 65 }.data(), 2) == 0) {
#endif // WIN32
// UP ARROW
info(std::to_string(ConsoleHistoryReadIndex));
// info(std::to_string(ConsoleHistoryReadIndex));
if (!ConsoleHistory.empty()) {
if (ConsoleHistoryReadIndex != 0) {
ConsoleHistoryReadIndex -= 1;

View File

@ -130,14 +130,10 @@ void warn(const std::string& toPrint) {
LogLock.unlock();
}
void error(const std::string& toPrint) {
static int ECounter = 0;
LogLock.lock();
std::string Print = getDate() + Sec("[ERROR] ") + toPrint + "\n";
ConsoleOut(Print);
addToLog(Print);
if (ECounter > 10)
_Exit(7);
ECounter++;
LogLock.unlock();
}
void except(const std::string& toPrint) {