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:
Gleb Mazovetskiy
2021-01-07 13:55:35 +00:00
committed by Alibek Omarov
parent a234888d44
commit 6d614e028a
3 changed files with 4 additions and 3 deletions

View File

@@ -32,8 +32,9 @@ void COM_ResetLibraryError( void )
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, "\n", sizeof( s_szLastError ) );
}
void *COM_FunctionFromName_SR( void *hInstance, const char *pName )