fix buffer bug

This commit is contained in:
Sean Middleditch 2009-03-14 12:55:17 -04:00
parent 2d432c57fb
commit d30fd57bb2
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ static void _process(struct libtelnet_t *telnet, unsigned char *buffer,
}
/* pass through any remaining bytes */
if (i != start)
if (telnet->state == LIBTELNET_STATE_DATA && i != start)
libtelnet_data_cb(telnet, &buffer[start], i - start, user_data);
}