From 57b32819e73dba3675675c107b762f071dd361aa Mon Sep 17 00:00:00 2001 From: in1tiate Date: Sat, 3 Apr 2021 13:01:34 -0500 Subject: [PATCH] fix showname being set to " " when it shouldn't --- src/packets.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/packets.cpp b/src/packets.cpp index ac6dce0..8f501d0 100644 --- a/src/packets.cpp +++ b/src/packets.cpp @@ -512,7 +512,8 @@ AOPacket AOClient::validateIcPacket(AOPacket packet) if (incoming_args.length() > 15) { // showname QString incoming_showname = dezalgo(incoming_args[15].toString().trimmed()); - if (incoming_showname.length() == 0) + // if the raw input is not empty but the trimmed input is, use a single space + if (incoming_showname.isEmpty() && !incoming_args[15].toString().isEmpty()) incoming_showname = " "; args.append(incoming_showname); showname = incoming_showname;