Robrecht Dewaele
-
2012-08-01
- priority: 5 --> 1
While adding debug code to the source I noticed the following code in libircclient.c:
885 if ( length < 0 )
886 {
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:
http://libircclient.svn.sourceforge.net/viewvc/libircclient/trunk/libircclient/src/libircclient.c?revision=111&content-type=text/plain