Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix deviceid test when model present but no vendor
Fixes small bug introduced in b26c5a4

Without this, the error message was appended to, and e.g. `device` could
end up as "UNKNOWN vendor/modelAFilterX" instead of the expected
"AFilterX"
  • Loading branch information
doismellburning committed Jul 16, 2025
commit 81abac632493c9c52bf6f8f942bf32418a437f62
5 changes: 5 additions & 0 deletions src/deviceid.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@ void deviceid_decode_dest (char *dest, char *device, size_t device_size)
strlcat (device, " ", device_size);
}

if (ptocalls[n].vendor == NULL && ptocalls[n].model != NULL) {
// If we don't have a vendor, but do have a model, wipe the error message
strlcpy (device, "", device_size);
}

if (ptocalls[n].model != NULL) {
strlcat (device, ptocalls[n].model, device_size);
}
Expand Down