From 5a73aa2502a36af15a2d19be4474093c232e04b2 Mon Sep 17 00:00:00 2001 From: "Keegan Drake H.P" Date: Thu, 17 Dec 2015 20:05:21 -0600 Subject: Added a check for an empty path --- Alc/backends/oss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alc/backends') diff --git a/Alc/backends/oss.c b/Alc/backends/oss.c index c7fc404c..9ca92410 100644 --- a/Alc/backends/oss.c +++ b/Alc/backends/oss.c @@ -104,7 +104,7 @@ static void ALCossListAppend(struct oss_device *list, char *handle, size_t hlen, struct oss_device *p; void *m; size_t i; - if (list == NULL || handle == NULL || path == NULL) + if (list == NULL || handle == NULL || path == NULL || plen == 0 || path[0] == '\0') return; /* skip the first item "OSS Default" */ p = list; @@ -118,7 +118,7 @@ static void ALCossListAppend(struct oss_device *list, char *handle, size_t hlen, plen = i; } #endif - if (handle == NULL || hlen == 0 || *handle == '\0') { + if (handle == NULL || hlen == 0 || handle[0] == '\0') { handle = path; hlen = plen; } -- cgit v1.2.3