mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 13:40:56 +00:00
Fix shifting bits out of byte in tr_font.c
Found using LLVM sanitizer. Reported by Dominic "lonkamikaze" Fandrey.
This commit is contained in:
parent
a494edeb94
commit
ae9edd1491
1 changed files with 1 additions and 1 deletions
|
@ -303,7 +303,7 @@ static int fdOffset;
|
|||
static byte *fdFile;
|
||||
|
||||
int readInt( void ) {
|
||||
int i = fdFile[fdOffset]+(fdFile[fdOffset+1]<<8)+(fdFile[fdOffset+2]<<16)+(fdFile[fdOffset+3]<<24);
|
||||
int i = ((unsigned int)fdFile[fdOffset] | ((unsigned int)fdFile[fdOffset+1]<<8) | ((unsigned int)fdFile[fdOffset+2]<<16) | ((unsigned int)fdFile[fdOffset+3]<<24));
|
||||
fdOffset += 4;
|
||||
return i;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue