diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-01-01 19:12:33 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-01-01 19:12:33 +0000 |
commit | 501f78a543278ad8659b8690124613e4000dec72 (patch) | |
tree | 2561f9e229274037d1dbabe603a0283da3049131 /source/files.c | |
parent | d41cf8df27ba78d52847e78b62c8d72117c77f4d (diff) |
Inspect `play' command more carefully in CL_ParseStuffText.
Made FS_LoadFile return 0 instead of -1 on gzipped files.
Cleaned up MVD_ParseUnicast.
Display chase target name on the screen for non-q2pro GTV clients.
Implemented UF_NOGAMECHAT = 8, UF_NOMVDCHAT = 16 user flags.
MVD_Say_f no longer uses SV_BroadcastPrintf.
Changed `scr_showfollowing' default value back to 1.
Filter svc_stufftext and svc_layout on game server before
sending mvd_unicast message to MVD clients.
Diffstat (limited to 'source/files.c')
-rw-r--r-- | source/files.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/files.c b/source/files.c index 4eeff95..ecc3008 100644 --- a/source/files.c +++ b/source/files.c @@ -1053,7 +1053,7 @@ int FS_LoadFileEx( const char *path, void **buffer, int flags ) { // get real file length length = FS_GetFileLength( f ); - if( buffer ) { + if( buffer && length != -1 ) { *buffer = buf = FS_AllocTempMem( length + 1 ); FS_Read( buf, length, f ); buf[length] = 0; @@ -1061,7 +1061,7 @@ int FS_LoadFileEx( const char *path, void **buffer, int flags ) { FS_FCloseFile( f ); - return length; + return length == -1 ? 0 : length; } int FS_LoadFile( const char *path, void **buffer ) { |