Commit 57161ff6 authored by Ivo Ivanov's avatar Ivo Ivanov Committed by Alexandre Julliard

winebus.sys: Accept whitespaces in strings parsed from uevent.

Fixes the device names appearing with the first words in joy.cpl and probably in games, when the UDEV bus is used in HIDRAW mode. Signed-off-by: 's avatarIvo Ivanov <logos128@gmail.com> Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 16bc6b05
......@@ -1121,13 +1121,13 @@ static void get_device_subsystem_info(struct udev_device *dev, char const *subsy
if (!strncmp(ptr, "HID_UNIQ=", 9))
{
if (desc->serialnumber[0]) continue;
if (sscanf(ptr, "HID_UNIQ=%256s\n", buffer) == 1)
if (sscanf(ptr, "HID_UNIQ=%256[^\n]", buffer) == 1)
ntdll_umbstowcs(buffer, strlen(buffer) + 1, desc->serialnumber, ARRAY_SIZE(desc->serialnumber));
}
if (!strncmp(ptr, "HID_NAME=", 9))
{
if (desc->product[0]) continue;
if (sscanf(ptr, "HID_NAME=%256s\n", buffer) == 1)
if (sscanf(ptr, "HID_NAME=%256[^\n]", buffer) == 1)
ntdll_umbstowcs(buffer, strlen(buffer) + 1, desc->product, ARRAY_SIZE(desc->product));
}
if (!strncmp(ptr, "HID_PHYS=", 9) || !strncmp(ptr, "PHYS=\"", 6))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment