Skip to content

Commit e5cafeb

Browse files
author
Miroslav Bendík
committed
Fixed crash on std::length_error
1 parent 5a2375e commit e5cafeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TileGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static inline int unsignedToSigned(long i, long max_positive)
4141

4242
static inline int readU16(const char *data)
4343
{
44-
return int(data[0]) * 256 + data[1];
44+
return uint8_t(data[0]) * 256 + uint8_t(data[1]);
4545
}
4646

4747
static inline int rgb2int(uint8_t r, uint8_t g, uint8_t b)

0 commit comments

Comments
 (0)