Use crc16 return value when calculating GUID
Fixes the regression introduced by919cd56b20
(cherry picked from commita2e05480d6
)
This commit is contained in:
parent
39a0013900
commit
e7c4575719
1 changed files with 4 additions and 4 deletions
|
@ -2458,11 +2458,11 @@ SDL_JoystickGUID SDL_CreateJoystickGUID(Uint16 bus, Uint16 vendor, Uint16 produc
|
||||||
SDL_zero(guid);
|
SDL_zero(guid);
|
||||||
|
|
||||||
if (vendor_name && *vendor_name && product_name && *product_name) {
|
if (vendor_name && *vendor_name && product_name && *product_name) {
|
||||||
SDL_crc16(crc, vendor_name, SDL_strlen(vendor_name));
|
crc = SDL_crc16(crc, vendor_name, SDL_strlen(vendor_name));
|
||||||
SDL_crc16(crc, " ", 1);
|
crc = SDL_crc16(crc, " ", 1);
|
||||||
SDL_crc16(crc, product_name, SDL_strlen(product_name));
|
crc = SDL_crc16(crc, product_name, SDL_strlen(product_name));
|
||||||
} else if (product_name) {
|
} else if (product_name) {
|
||||||
SDL_crc16(crc, product_name, SDL_strlen(product_name));
|
crc = SDL_crc16(crc, product_name, SDL_strlen(product_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We only need 16 bits for each of these; space them out to fill 128. */
|
/* We only need 16 bits for each of these; space them out to fill 128. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue