mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-23 17:25:24 +01:00
Fix COM_LibraryError newline handling
1. Do not append a trailing newline to the result of COM_GetLibraryError. 2. Fix call sites.
This commit is contained in:
parent
a234888d44
commit
6d614e028a
@ -1046,7 +1046,7 @@ int GAME_EXPORT pfnCheckGameDll( void )
|
|||||||
COM_FreeLibrary( hInst ); // don't increase linker's reference counter
|
COM_FreeLibrary( hInst ); // don't increase linker's reference counter
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Con_Reportf( S_WARN "Could not load server library:\n%s", COM_GetLibraryError() );
|
Con_Reportf( S_WARN "Could not load server library: %s\n", COM_GetLibraryError() );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ void VGui_Startup( const char *clientlib, int width, int height )
|
|||||||
if( !s_pVGuiSupport )
|
if( !s_pVGuiSupport )
|
||||||
{
|
{
|
||||||
if( FS_FileExists( vguiloader, false ) )
|
if( FS_FileExists( vguiloader, false ) )
|
||||||
Con_Reportf( S_ERROR "Failed to load vgui_support library: %s", COM_GetLibraryError() );
|
Con_Reportf( S_ERROR "Failed to load vgui_support library: %s\n", COM_GetLibraryError() );
|
||||||
else
|
else
|
||||||
Con_Reportf( "vgui_support: not found\n" );
|
Con_Reportf( "vgui_support: not found\n" );
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,9 @@ void COM_ResetLibraryError( void )
|
|||||||
|
|
||||||
void COM_PushLibraryError( const char *error )
|
void COM_PushLibraryError( const char *error )
|
||||||
{
|
{
|
||||||
|
if( s_szLastError[0] )
|
||||||
|
Q_strncat( s_szLastError, "\n", sizeof( s_szLastError ) );
|
||||||
Q_strncat( s_szLastError, error, sizeof( s_szLastError ) );
|
Q_strncat( s_szLastError, error, sizeof( s_szLastError ) );
|
||||||
Q_strncat( s_szLastError, "\n", sizeof( s_szLastError ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *COM_FunctionFromName_SR( void *hInstance, const char *pName )
|
void *COM_FunctionFromName_SR( void *hInstance, const char *pName )
|
||||||
|
Loading…
Reference in New Issue
Block a user