mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
utils: fix get_id32 with non-ascii chars
This commit is contained in:
parent
0b01723630
commit
af6a1e7469
@ -140,7 +140,7 @@ static inline int clamp16(int32_t val) {
|
||||
/* transforms a string to uint32 (for comparison), but if this is static + all goes well
|
||||
* compiler should pre-calculate and use uint32 directly */
|
||||
static inline /*const*/ uint32_t get_id32be(const char* s) {
|
||||
return (uint32_t)(s[0] << 24) | (s[1] << 16) | (s[2] << 8) | (s[3] << 0);
|
||||
return (uint32_t)((uint8_t)s[0] << 24) | ((uint8_t)s[1] << 16) | ((uint8_t)s[2] << 8) | ((uint8_t)s[3] << 0);
|
||||
}
|
||||
|
||||
//static inline /*const*/ uint32_t get_id32le(const char* s) {
|
||||
|
Loading…
Reference in New Issue
Block a user