mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
Fix narrowing conversion error
This commit is contained in:
parent
56be067af6
commit
8a924da586
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ int SafeWriter::writeS(short val) {
|
||||||
return write(&val,2);
|
return write(&val,2);
|
||||||
}
|
}
|
||||||
int SafeWriter::writeS_BE(short val) {
|
int SafeWriter::writeS_BE(short val) {
|
||||||
unsigned char bytes[2]{(val>>8)&0xff, val&0xff};
|
unsigned char bytes[2]{(unsigned char)((val>>8)&0xff), (unsigned char)(val&0xff)};
|
||||||
return write(bytes,2);
|
return write(bytes,2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue