[Cleanup] Fix GetLastName() length check in Client::SendWindow() (#3263)

# Notes
- `target->GetLastName()` was always true, we need to make sure the target has a last name.
This commit is contained in:
Alex King 2023-04-05 10:23:54 -04:00 committed by GitHub
parent a0768d2d28
commit 3d2f560436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3957,7 +3957,7 @@ void Client::SendWindow(
case 1: {
char name[64] = "";
strcpy(name, target->GetName());
if (target->GetLastName()) {
if (strlen(target->GetLastName()) > 0) {
char last_name[64] = "";
strcpy(last_name, target->GetLastName());
strcat(name, " ");