diff --git a/filesystem/VFileSystem009.cpp b/filesystem/VFileSystem009.cpp index 0c9de1ad..c8ecf525 100644 --- a/filesystem/VFileSystem009.cpp +++ b/filesystem/VFileSystem009.cpp @@ -531,9 +531,9 @@ extern "C" void EXPORT *CreateInterface( const char *interface, int *retval ) if( !Q_strcmp( interface, FS_API_CREATEINTERFACE_TAG )) { - static fs_api_t copy = { 0 }; // return a copy, to disallow overriding + static fs_api_t copy; // return a copy, to disallow overriding - memcpy( ©, &g_api, sizeof( copy )); + copy = g_api; if( retval ) *retval = 0; diff --git a/filesystem/filesystem.c b/filesystem/filesystem.c index e5c95606..53bf6d20 100644 --- a/filesystem/filesystem.c +++ b/filesystem/filesystem.c @@ -3078,7 +3078,7 @@ int EXPORT GetFSAPI( int version, fs_api_t *api, fs_globals_t **globals, fs_inte if( engfuncs && !FS_InitInterface( version, engfuncs )) return 0; - memcpy( api, &g_api, sizeof( *api )); + *api = g_api; *globals = &FI; return FS_API_VERSION;