From 6a7af725d6f857b961ebf888f5156d771067f97d Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 17 Jun 2014 21:28:22 -0500 Subject: Fix SkipRestOfLine going past end of string If string data starts with a 0 (string terminator), don't skip over it at p++. Not causing any problems in ioq3 as far as I know. --- src/qcommon/q_shared.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/qcommon') diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c index 2c5d76d1..f226603d 100644 --- a/src/qcommon/q_shared.c +++ b/src/qcommon/q_shared.c @@ -601,6 +601,10 @@ void SkipRestOfLine ( char **data ) { int c; p = *data; + + if ( !*p ) + return; + while ( (c = *p++) != 0 ) { if ( c == '\n' ) { com_lines++; -- cgit