mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-22 07:23:46 +01:00
Fixed crash on std::length_error
This commit is contained in:
parent
5a2375e608
commit
e5cafeb8b8
@ -41,7 +41,7 @@ static inline int unsignedToSigned(long i, long max_positive)
|
|||||||
|
|
||||||
static inline int readU16(const char *data)
|
static inline int readU16(const char *data)
|
||||||
{
|
{
|
||||||
return int(data[0]) * 256 + data[1];
|
return uint8_t(data[0]) * 256 + uint8_t(data[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int rgb2int(uint8_t r, uint8_t g, uint8_t b)
|
static inline int rgb2int(uint8_t r, uint8_t g, uint8_t b)
|
||||||
|
Loading…
Reference in New Issue
Block a user