Adding explicit cast to uint8_t

This commit is contained in:
Stephen Gowen 2017-11-16 17:41:50 -05:00
parent 50bbd36b4a
commit 5e64465300

View File

@ -138,7 +138,7 @@ static GLFWbool parseMapping(_GLFWmapping* mapping, const char* string)
{
const unsigned long hat = strtoul(c + 1, (char**) &c, 10);
const unsigned long bit = strtoul(c + 1, (char**) &c, 10);
fields[i].element->value = (hat << 4) | bit;
fields[i].element->value = (uint8_t) (hat << 4) | bit;
}
else
fields[i].element->value = (uint8_t) strtoul(c + 1, (char**) &c, 10);