Clear trailing whitespace from the cpu features string

This commit is contained in:
Chris Robinson 2017-02-07 11:19:41 -08:00
parent c771b82a39
commit 317d135b96

View File

@ -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;