Skip to content

Commit

Permalink
fix showname being set to " " when it shouldn't
Browse files Browse the repository at this point in the history
  • Loading branch information
in1tiate committed Apr 3, 2021
1 parent 737f2f1 commit 57b3281
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/packets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 57b3281

Please sign in to comment.