diff options
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/common.c | 9 | ||||
-rw-r--r-- | src/qcommon/unzip.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c index ff742803..e2aa156c 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -3154,6 +3154,8 @@ static void Field_CompleteCommand( char *cmd, } else { + int completionOffset; + if( completionString[0] == '\\' || completionString[0] == '/' ) completionString++; @@ -3172,9 +3174,10 @@ static void Field_CompleteCommand( char *cmd, if( matchCount == 0 ) return; // no matches - Q_strncpyz( &completionField->buffer[ strlen( completionField->buffer ) - - strlen( completionString ) ], shortestMatch, - sizeof( completionField->buffer ) ); + completionOffset = strlen( completionField->buffer ) - strlen( completionString ); + + Q_strncpyz( &completionField->buffer[ completionOffset ], shortestMatch, + sizeof( completionField->buffer ) - completionOffset ); completionField->cursor = strlen( completionField->buffer ); diff --git a/src/qcommon/unzip.c b/src/qcommon/unzip.c index ac956091..7daf271b 100644 --- a/src/qcommon/unzip.c +++ b/src/qcommon/unzip.c @@ -4048,7 +4048,7 @@ int inflateInit2_(z_streamp z, int w, const char *version, int stream_size) /* create inflate_blocks state */ if ((z->state->blocks = - inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w)) + inflate_blocks_new(z, z->state->nowrap ? ((check_func)0) : adler32, (uInt)1 << w)) == Z_NULL) { inflateEnd(z); |