Skip to content

Commit

Permalink
fix the client crash when you open the missions window (#3844)
Browse files Browse the repository at this point in the history
  • Loading branch information
MillhioreBT committed Dec 13, 2021
1 parent ced2425 commit f4ec19a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2366,8 +2366,10 @@ void ProtocolGame::sendQuestLine(const Quest* quest)
msg.add<uint16_t>(quest->getID());
msg.addByte(quest->getMissionsCount(player));

uint16_t missionId = 0;
for (const Mission& mission : quest->getMissions()) {
if (mission.isStarted(player)) {
msg.add<uint16_t>(++missionId);
msg.addString(mission.getName(player));
msg.addString(mission.getDescription(player));
}
Expand Down

0 comments on commit f4ec19a

Please sign in to comment.