mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-23 03:22:08 +00:00
utf8decoder: Use byte-sized byte argument
This prevents passing a negative value out of a signed char by accident. Also renders some casts in the code superfluous.
This commit is contained in:
2
src/extern/utf8decoder.c
vendored
2
src/extern/utf8decoder.c
vendored
@@ -38,7 +38,7 @@ static const uint8_t utf8d[] = {
|
||||
1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* s8 */
|
||||
};
|
||||
|
||||
uint32_t decode(uint32_t *state, uint32_t *codep, uint32_t byte)
|
||||
uint32_t decode(uint32_t *state, uint32_t *codep, uint8_t byte)
|
||||
{
|
||||
uint32_t type = utf8d[byte];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user