aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-02-07 11:19:41 -0800
committerChris Robinson <[email protected]>2017-02-07 11:19:41 -0800
commit317d135b96bc1d2a095a9e249588182883540093 (patch)
treebcda94e632b9a89c9484f7af5733717fabe89926 /Alc/helpers.c
parentc771b82a39bcbb29b2ab97b3e592ee96a190e7cc (diff)
Clear trailing whitespace from the cpu features string
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r--Alc/helpers.c5
1 files changed, 5 insertions, 0 deletions
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;