diff options
author | Andrey Nazarov <skuller@skuller.net> | 2007-12-15 21:14:05 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2007-12-15 21:14:05 +0000 |
commit | d6a27b45135b034fe05122f815841c1b22554a1e (patch) | |
tree | 0dd1851350567df454e502cacb7077585557191c /source/files.c | |
parent | a21868632c585f33742f7e295aafad36a436cdd9 (diff) |
Added `scoreshot' command, dumps layout into 80x40 chars *.txt file.
Cleaned up zone memory code.
Consider left/right CTRL and ALT modifiers as consolekeys.
Fixed evil FS_ListFiles memory corruption bug.
Diffstat (limited to 'source/files.c')
-rw-r--r-- | source/files.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/files.c b/source/files.c index de1ba0b..469fe48 100644 --- a/source/files.c +++ b/source/files.c @@ -1851,19 +1851,19 @@ void **FS_ListFiles( const char *path, continue; } memcpy( buffer, search->filename, len ); - buffer[len] = '/'; - memcpy( buffer + len + 1, path, pathlen + 1 ); + buffer[len++] = '/'; + memcpy( buffer + len, path, pathlen + 1 ); s = buffer; } else { s = search->filename; } if( flags & FS_SEARCH_BYFILTER ) { - len += len + pathlen + 1; + len += pathlen + 1; } dirlist = Sys_ListFiles( s, extension, - flags|FS_SEARCH_NOSORT, len + 1, &dircount ); + flags|FS_SEARCH_NOSORT, len, &dircount ); if( !dirlist ) { continue; } |