From b4a4fe98d4b8fad7e477b78217972384225dfbe9 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 8 Oct 2017 07:07:53 -0500 Subject: [PATCH] Fix reading crash log when log wraps around buffer --- code/sys/con_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/sys/con_log.c b/code/sys/con_log.c index c3a4a5b8..bc1c5aef 100644 --- a/code/sys/con_log.c +++ b/code/sys/con_log.c @@ -121,7 +121,7 @@ unsigned int CON_LogRead( char *out, unsigned int outSize ) } Com_Memcpy( out, consoleLog + readPos, firstChunk ); - Com_Memcpy( out + firstChunk, out, secondChunk ); + Com_Memcpy( out + firstChunk, consoleLog, secondChunk ); readPos = ( readPos + outSize ) % MAX_LOG;