winmm_output: handle empty string case when parsing device id

This commit is contained in:
Denis Krjuchkov 2010-11-04 11:09:50 +05:00
parent 7612bf1bfa
commit 9dee419b7c

View File

@ -81,7 +81,7 @@ get_device_id(const char *device_name)
/* check for device id */
char *endptr;
UINT id = strtoul(device_name, &endptr, 0);
if (*endptr == 0)
if (endptr > device_name && *endptr == 0)
return id;
/* check for device name */