Fix debug output on the console.
Check if there's a \n at the end, if not, append one. Before, it checked for a \n anywhere in the string, and if there was, wouldn't append one. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11638 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
8c79885bc7
commit
fadd32b1e6
|
@ -118,7 +118,7 @@ static code_part code_part_from_str(const char *str)
|
|||
*/
|
||||
void debug_callback_stderr( WZ_DECL_UNUSED void ** data, const char * outputBuffer )
|
||||
{
|
||||
if ( !strchr( outputBuffer, '\n' ) ) {
|
||||
if ( outputBuffer[strlen(outputBuffer) - 1] != '\n' ) {
|
||||
fprintf( stderr, "%s\n", outputBuffer );
|
||||
} else {
|
||||
fprintf( stderr, "%s", outputBuffer );
|
||||
|
|
Loading…
Reference in New Issue