Fix reading crash log when log wraps around buffer

This commit is contained in:
Zack Middleton 2017-10-08 07:07:53 -05:00
parent 9e502bda4d
commit b4a4fe98d4

View file

@ -121,7 +121,7 @@ unsigned int CON_LogRead( char *out, unsigned int outSize )
} }
Com_Memcpy( out, consoleLog + readPos, firstChunk ); Com_Memcpy( out, consoleLog + readPos, firstChunk );
Com_Memcpy( out + firstChunk, out, secondChunk ); Com_Memcpy( out + firstChunk, consoleLog, secondChunk );
readPos = ( readPos + outSize ) % MAX_LOG; readPos = ( readPos + outSize ) % MAX_LOG;