aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Krjuchkov <alcohold@gmail.com>2010-11-04 11:09:50 +0500
committerDenis Krjuchkov <alcohold@gmail.com>2010-11-04 11:09:50 +0500
commit9dee419b7ca92fbd0d376e0cf6d55903150d0e3b (patch)
tree5faefeb068832108c04cf347f42e2d0ad9720d5b /src
parent7612bf1bfac65160f0357726206630340bee4672 (diff)
downloadmpd-9dee419b7ca92fbd0d376e0cf6d55903150d0e3b.tar.gz
mpd-9dee419b7ca92fbd0d376e0cf6d55903150d0e3b.tar.xz
mpd-9dee419b7ca92fbd0d376e0cf6d55903150d0e3b.zip
winmm_output: handle empty string case when parsing device id
Diffstat (limited to '')
-rw-r--r--src/output/winmm_output_plugin.c2
1 files changed, 1 insertions, 1 deletions
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 */