From 9dee419b7ca92fbd0d376e0cf6d55903150d0e3b Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Thu, 4 Nov 2010 11:09:50 +0500 Subject: winmm_output: handle empty string case when parsing device id --- src/output/winmm_output_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/output/winmm_output_plugin.c b/src/output/winmm_output_plugin.c index eea5bdb9e..b9687874d 100644 --- a/src/output/winmm_output_plugin.c +++ b/src/output/winmm_output_plugin.c @@ -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 */ -- cgit v1.2.3