diff options
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/q_shared.c | 8 | ||||
-rw-r--r-- | src/qcommon/q_shared.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c index 9cea9bda..ea365b55 100644 --- a/src/qcommon/q_shared.c +++ b/src/qcommon/q_shared.c @@ -553,16 +553,14 @@ void COM_MatchToken( char **buf_p, char *match ) { ================= SkipBracedSection -The next token should be an open brace. +The next token should be an open brace or set depth to 1 if already parsed it. Skips until a matching close brace is found. Internal brace depths are properly skipped. ================= */ -void SkipBracedSection (char **program) { +qboolean SkipBracedSection (char **program, int depth) { char *token; - int depth; - depth = 0; do { token = COM_ParseExt( program, qtrue ); if( token[1] == 0 ) { @@ -574,6 +572,8 @@ void SkipBracedSection (char **program) { } } } while( depth && *program ); + + return ( depth == 0 ); } /* diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index a85e3473..88322482 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -801,7 +801,7 @@ typedef struct pc_token_s void COM_MatchToken( char**buf_p, char *match ); -void SkipBracedSection (char **program); +qboolean SkipBracedSection (char **program, int depth); void SkipRestOfLine ( char **data ); void Parse1DMatrix (char **buf_p, int x, float *m); |