[Client] When there are more client than server plugins, print them all

This commit is contained in:
David Cernat 2017-05-03 03:14:11 +03:00
parent 92e277d75d
commit 0b40cb8919

View file

@ -144,7 +144,7 @@ string comparePluginsMonospaced(PacketPreInit::PluginContainer checksums, Packet
printWithWidth(sstr, "name", pluginNameLen2 + 2);
sstr << "hash\n";
for (size_t i = 0; i < checksumsResponse.size(); i++)
for (size_t i = 0; i < checksums.size() || i < checksumsResponse.size(); i++)
{
string plugin;
unsigned val;
@ -162,6 +162,8 @@ string comparePluginsMonospaced(PacketPreInit::PluginContainer checksums, Packet
printWithWidth(sstr, "", pluginNameLen1 + 16);
}
if (i < checksumsResponse.size())
{
printWithWidth(sstr, checksumsResponse[i].first, pluginNameLen2 + 2);
if (checksumsResponse[i].second.size() > 0)
{
@ -173,6 +175,8 @@ string comparePluginsMonospaced(PacketPreInit::PluginContainer checksums, Packet
}
else
sstr << "any";
}
sstr << "\n";
}