mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
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.
This commit is contained in:
parent
95b241b8ba
commit
5c1091b414
1 changed files with 4 additions and 0 deletions
|
@ -600,6 +600,10 @@ void SkipRestOfLine ( char **data ) {
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
p = *data;
|
p = *data;
|
||||||
|
|
||||||
|
if ( !*p )
|
||||||
|
return;
|
||||||
|
|
||||||
while ( (c = *p++) != 0 ) {
|
while ( (c = *p++) != 0 ) {
|
||||||
if ( c == '\n' ) {
|
if ( c == '\n' ) {
|
||||||
com_lines++;
|
com_lines++;
|
||||||
|
|
Loading…
Reference in a new issue