From 317d135b96bc1d2a095a9e249588182883540093 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 7 Feb 2017 11:19:41 -0800 Subject: [PATCH] Clear trailing whitespace from the cpu features string --- Alc/helpers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Alc/helpers.c b/Alc/helpers.c index ef0c8e88..eb00acb8 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -242,11 +242,16 @@ void FillCPUCaps(ALuint capfilter) char buf[256]; while(fgets(buf, sizeof(buf), file) != NULL) { + size_t len; char *str; if(strncmp(buf, "Features\t:", 10) != 0) continue; + len = strlen(buf); + while(len > 0 && isspace(buf[len-1])) + buf[--len] = 0; + TRACE("Got features string:%s\n", buf+10); str = buf;