The documentation states that playerc_client_read will return NULL on error, however sometimes it returns -1. This is due to someone trying to add a check so it will return NULL when the socket is invalid (client->sock < 0) however it was added to the wrong if statement. This patch fixes it.
This also fixes libplayerc++ as the error checking is done against libplayerc. So programs like playerjoy give "playerc warning : warning : no socket to peek at" in a tight loop.
Log in to post a comment.