diff options
author | Chris Robinson <[email protected]> | 2017-02-07 11:19:41 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-02-07 11:19:41 -0800 |
commit | 317d135b96bc1d2a095a9e249588182883540093 (patch) | |
tree | bcda94e632b9a89c9484f7af5733717fabe89926 /Alc/helpers.c | |
parent | c771b82a39bcbb29b2ab97b3e592ee96a190e7cc (diff) |
Clear trailing whitespace from the cpu features string
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r-- | Alc/helpers.c | 5 |
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; |