summaryrefslogtreecommitdiff
path: root/source/ui_script.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-11-13 18:58:41 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-11-13 18:58:41 +0000
commitbbefa87db18f5b76dc67efa00b7cc798361480f3 (patch)
treeefc130fe3b4fe22f111154a8720491b756daa7bd /source/ui_script.c
parentd65e02496cd9873f5bb0297661b19762b44ddfec (diff)
Hacked the source to get it compile on Windows Mobile using CeGCC toolchain.
Fixed nasty memory corruption bug in UI scripts loading code. Fixed software refresh compilation issues on Windows. Inactive MVD channels are now completely destroyed and recreated once they are active again, and they are no longer allowed to stay in waiting state forever. Fixed delay buffer overflow resulting in fatal connection error. Preserve MVD stream flags in demos recorded on GTV server, and handle `inuse' flag correctly on players when writing gamestate. Updated documentation and Debian package descriptions.
Diffstat (limited to 'source/ui_script.c')
-rw-r--r--source/ui_script.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/ui_script.c b/source/ui_script.c
index 2cd4fb2..a51fbde 100644
--- a/source/ui_script.c
+++ b/source/ui_script.c
@@ -294,16 +294,17 @@ static void Parse_Color( void ) {
}
static qboolean Parse_File( const char *path, int depth ) {
- char *data, *p, *cmd;
+ char *raw, *data, *p, *cmd;
int argc;
menuFrameWork_t *menu = NULL;
- FS_LoadFile( path, ( void ** )&data );
- if( !data ) {
+ FS_LoadFile( path, ( void ** )&raw );
+ if( !raw ) {
Com_Printf( "Couldn't load %s\n", path );
return qfalse;
}
+ data = raw;
COM_Compress( data );
while( *data ) {
@@ -415,7 +416,7 @@ static qboolean Parse_File( const char *path, int depth ) {
data = p + 1;
}
- FS_FreeFile( data );
+ FS_FreeFile( raw );
return qtrue;
}