diff options
author | Keegan Drake H.P <[email protected]> | 2015-12-17 20:05:21 -0600 |
---|---|---|
committer | Keegan Drake H.P <[email protected]> | 2015-12-17 20:05:21 -0600 |
commit | 5a73aa2502a36af15a2d19be4474093c232e04b2 (patch) | |
tree | cb55d3df3345b1dcb7c3ac4e7109758510d740a6 /Alc/backends | |
parent | df2ee7ba873153a7bfe53665fd273eef22d12c68 (diff) |
Added a check for an empty path
Diffstat (limited to 'Alc/backends')
-rw-r--r-- | Alc/backends/oss.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |