diff options
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/q_shared.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c index 59ddf2ed..ce28f953 100644 --- a/src/qcommon/q_shared.c +++ b/src/qcommon/q_shared.c @@ -937,17 +937,14 @@ int Q_CountChar(const char *string, char tocount) void Q_StripIndentMarker(char *string) { - int i; - - for (i = 0; i < strlen(string); i++) { - if (string[i] == INDENT_MARKER) { - int j; + int i, j; - for (j = i; j < strlen(string); j++) { - string[j] = string[j+1]; - } + for (i = j = 0; string[i]; i++) { + if (string[i] != INDENT_MARKER) { + string[j++] = string[i]; } } + string[j] = 0; } void Q_ParseNewlines( char *dest, const char *src, int destsize ) |