1
0
Fork 0

Codefix: Fix compilation with DEBUG_DUMP_COMMANDS. (#14228)

pull/14224/head
frosch 2025-05-06 21:11:30 +02:00 committed by GitHub
parent 592cc49b62
commit cd7ac64f9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1126,7 +1126,7 @@ void NetworkGameLoop()
if (TimerGameEconomy::date == next_date && TimerGameEconomy::date_fract == next_date_fract) {
if (cp != nullptr) {
NetworkSendCommand(cp->cmd, cp->err_msg, nullptr, cp->company, cp->data);
Debug(desync, 0, "Injecting: {:08x}; {:02x}; {:02x}; {:08x}; {} ({})", TimerGameEconomy::date, TimerGameEconomy::date_fract, (int)_current_company, cp->cmd, FormatArrayAsHex(cp->data), GetCommandName(cp->cmd));
Debug(desync, 0, "Injecting: {:08x}; {:02x}; {:02x}; {:08x}; {} ({})", TimerGameEconomy::date, TimerGameEconomy::date_fract, _current_company.base(), cp->cmd, FormatArrayAsHex(cp->data), GetCommandName(cp->cmd));
delete cp;
cp = nullptr;
}
@ -1187,7 +1187,7 @@ void NetworkGameLoop()
cp->data.clear();
for (size_t i = 0; i + 1 < args.size(); i += 2) {
uint8_t e = 0;
std::from_chars(buffer + i, buffer + i + 2, e, 16);
std::from_chars(args.data() + i, args.data() + i + 2, e, 16);
cp->data.push_back(e);
}
} else if (consumer.ReadIf("join: ")) {