mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-06-18 19:30:52 +00:00
Fix crashing when port checking, remove debug prints
This commit is contained in:
+1
-1
@@ -140,7 +140,7 @@ static void ProcessCompositeInput() {
|
|||||||
if (CompositeInput.size() == 2 && memcmp(CompositeInput.data(), std::array<char, 2> { 91, 65 }.data(), 2) == 0) {
|
if (CompositeInput.size() == 2 && memcmp(CompositeInput.data(), std::array<char, 2> { 91, 65 }.data(), 2) == 0) {
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
// UP ARROW
|
// UP ARROW
|
||||||
info(std::to_string(ConsoleHistoryReadIndex));
|
// info(std::to_string(ConsoleHistoryReadIndex));
|
||||||
if (!ConsoleHistory.empty()) {
|
if (!ConsoleHistory.empty()) {
|
||||||
if (ConsoleHistoryReadIndex != 0) {
|
if (ConsoleHistoryReadIndex != 0) {
|
||||||
ConsoleHistoryReadIndex -= 1;
|
ConsoleHistoryReadIndex -= 1;
|
||||||
|
|||||||
@@ -130,14 +130,10 @@ void warn(const std::string& toPrint) {
|
|||||||
LogLock.unlock();
|
LogLock.unlock();
|
||||||
}
|
}
|
||||||
void error(const std::string& toPrint) {
|
void error(const std::string& toPrint) {
|
||||||
static int ECounter = 0;
|
|
||||||
LogLock.lock();
|
LogLock.lock();
|
||||||
std::string Print = getDate() + Sec("[ERROR] ") + toPrint + "\n";
|
std::string Print = getDate() + Sec("[ERROR] ") + toPrint + "\n";
|
||||||
ConsoleOut(Print);
|
ConsoleOut(Print);
|
||||||
addToLog(Print);
|
addToLog(Print);
|
||||||
if (ECounter > 10)
|
|
||||||
_Exit(7);
|
|
||||||
ECounter++;
|
|
||||||
LogLock.unlock();
|
LogLock.unlock();
|
||||||
}
|
}
|
||||||
void except(const std::string& toPrint) {
|
void except(const std::string& toPrint) {
|
||||||
|
|||||||
Reference in New Issue
Block a user