From d6a27b45135b034fe05122f815841c1b22554a1e Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Sat, 15 Dec 2007 21:14:05 +0000 Subject: 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. --- source/files.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/files.c') 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; } -- cgit v1.2.3