diff options
Diffstat (limited to 'src/renderergl2/tr_image.c')
-rw-r--r-- | src/renderergl2/tr_image.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/renderergl2/tr_image.c b/src/renderergl2/tr_image.c index 060eb1c4..d4ccb170 100644 --- a/src/renderergl2/tr_image.c +++ b/src/renderergl2/tr_image.c @@ -3008,12 +3008,15 @@ static char *CommaParse( char **data_p ) { // skip double slash comments if ( c == '/' && data[1] == '/' ) { - while (*data && *data != '\n') + data += 2; + while (*data && *data != '\n') { data++; + } } // skip /* */ comments else if ( c=='/' && data[1] == '*' ) { + data += 2; while ( *data && ( *data != '*' || data[1] != '/' ) ) { data++; @@ -3046,7 +3049,7 @@ static char *CommaParse( char **data_p ) { *data_p = ( char * ) data; return com_token; } - if (len < MAX_TOKEN_CHARS) + if (len < MAX_TOKEN_CHARS - 1) { com_token[len] = c; len++; @@ -3057,7 +3060,7 @@ static char *CommaParse( char **data_p ) { // parse a regular word do { - if (len < MAX_TOKEN_CHARS) + if (len < MAX_TOKEN_CHARS - 1) { com_token[len] = c; len++; @@ -3066,11 +3069,6 @@ static char *CommaParse( char **data_p ) { c = *data; } while (c>32 && c != ',' ); - if (len == MAX_TOKEN_CHARS) - { -// ri.Printf (PRINT_DEVELOPER, "Token exceeded %i chars, discarded.\n", MAX_TOKEN_CHARS); - len = 0; - } com_token[len] = 0; *data_p = ( char * ) data; |