From af7330de881dd165a37c6753269a7bec1c27f85a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 30 Sep 2014 21:49:29 -0700 Subject: Copy the null terminator from the string instead of appending it --- Alc/ALc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index fdc7bcbf..6a0a1ed0 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1266,10 +1266,7 @@ static void AppendDevice(const ALCchar *name, al_string *devnames) { size_t len = strlen(name); if(len > 0) - { - al_string_append_range(devnames, name, name+len); - al_string_append_char(devnames, '\0'); - } + al_string_append_range(devnames, name, name+len+1); } void AppendAllDevicesList(const ALCchar *name) { AppendDevice(name, &alcAllDevicesList); } -- cgit v1.2.3