mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 23:18:29 +00:00
Use crc16 return value when calculating GUID
Fixes the regression introduced by 919cd56b20
This commit is contained in:

committed by
Sam Lantinga

parent
2ad50e9675
commit
a2e05480d6
@@ -2615,11 +2615,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. */
|
||||||
|
Reference in New Issue
Block a user