While adding debug code to the source I noticed the following code in libircclient.c:
885 if ( length < 0 )
887 if ( session->lasterror == 0 )
888 session->lasterror = (length == 0 ? LIBIRC_ERR_CLOSED : LIBIRC_ERR_TERMINATED);
The code on line 888 tests 'length == 0', but it resides in the consequence block of an if statement which tests for 'length < 0'. Therefore, 'LIBIRC_ERR_CLOSED' can never be assigned to 'session->lasterror'.
I double checked this against the following version in SVN:
Log in to post a comment.