Skip to content

Commit

Permalink
Fix signed bit operations in MSG_ReadBits
Browse files Browse the repository at this point in the history
  • Loading branch information
lonkamikaze authored and zturtleman committed Apr 9, 2018
1 parent 62cec24 commit 3a702de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/qcommon/msg.c
Expand Up @@ -239,7 +239,7 @@ int MSG_ReadBits( msg_t *msg, int bits ) {
for(i=0;i<bits;i+=8) {
Huff_offsetReceive (msgHuff.decompressor.tree, &get, msg->data, &msg->bit, msg->cursize<<3);
// fwrite(&get, 1, 1, fp);
value |= (get<<(i+nbits));
value = (unsigned int)value | ((unsigned int)get<<(i+nbits));

if (msg->bit > msg->cursize<<3) {
msg->readcount = msg->cursize + 1;
Expand Down

0 comments on commit 3a702de

Please sign in to comment.