aboutsummaryrefslogtreecommitdiff
path: root/src/packet_distribution.cpp
diff options
context:
space:
mode:
authorin1tiate <32779090+in1tiate@users.noreply.github.com>2021-03-20 22:39:15 -0500
committerGitHub <noreply@github.com>2021-03-20 22:39:15 -0500
commitbddf6c67c2f6822f9f2b02b0c478bc0af71e1e8a (patch)
tree4a07ec9140b3bcbe3cae3465534649df5570a968 /src/packet_distribution.cpp
parent510c0f4b17f24eb534d22654a41e9157c89a8211 (diff)
Don't decode LE contents until after splitting by "&" (#500)
Should fix evidence, again.
Diffstat (limited to 'src/packet_distribution.cpp')
-rw-r--r--src/packet_distribution.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp
index 95b8fa06..f3810ca7 100644
--- a/src/packet_distribution.cpp
+++ b/src/packet_distribution.cpp
@@ -120,6 +120,7 @@ void AOApplication::append_to_demofile(QString packet_string)
void AOApplication::server_packet_received(AOPacket *p_packet)
{
+ QStringList f_contents_encoded = p_packet->get_contents();
p_packet->net_decode();
QString header = p_packet->get_header();
@@ -540,12 +541,16 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
if (courtroom_constructed) {
QVector<evi_type> f_evi_list;
- for (QString f_string : f_contents) {
+ for (QString f_string : f_contents_encoded) {
QStringList sub_contents = f_string.split("&");
if (sub_contents.size() < 3)
continue;
+ // decoding has to be done here instead of on reception
+ // because this packet uses & as a delimiter for some reason
+ AOPacket::unescape(sub_contents);
+
evi_type f_evi;
f_evi.name = sub_contents.at(0);
f_evi.description = sub_contents.at(1);
@@ -723,11 +728,9 @@ void AOApplication::send_server_packet(AOPacket *p_packet, bool encoded)
p_packet->net_encode();
QString f_packet = p_packet->to_string();
-
#ifdef DEBUG_NETWORK
qDebug() << "S:" << f_packet;
#endif
-
net_manager->ship_server_packet(f_packet);
delete p_packet;