Skip to content

Commit

Permalink
Merge pull request #51 from AttorneyOnline/fix-showname
Browse files Browse the repository at this point in the history
Fix shownames being set to a single space when the user does not specify one
  • Loading branch information
mposs00 authored Apr 3, 2021
2 parents 737f2f1 + 57b3281 commit c6bc249
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 c6bc249

Please sign in to comment.