mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
fixes crash on servers with invalid packet
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
1450ffca18
commit
0689e58ca2
|
|
@ -60,9 +60,13 @@ void McClient::readRawResponse()
|
|||
if (m_responseReadState == 1 && m_resp.size() >= m_wantedRespLength) {
|
||||
if (m_resp.size() > m_wantedRespLength) {
|
||||
qDebug().nospace() << "Warning: Packet length doesn't match actual packet size (" << m_wantedRespLength << " expected vs "
|
||||
<< m_resp.size() << " received)";
|
||||
<< m_resp.size() << " received)";
|
||||
}
|
||||
try {
|
||||
parseResponse();
|
||||
} catch (const Exception& e) {
|
||||
emitFail(e.cause());
|
||||
}
|
||||
parseResponse();
|
||||
m_responseReadState = 2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue