Fix end-of-test comparison

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1022 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-10-09 22:53:07 +00:00
parent 54a8127c6c
commit d3935d8624

View File

@ -1149,7 +1149,7 @@ static int lpc214x_rdrequest(struct lpc214x_ep_s *privep)
*/
privreq->req.xfrd += nbytesread;
if (privreq->req.len < privreq->req.xfrd || nbytesread < privep->ep.maxpacket)
if (privreq->req.xfrd >= privreq->req.len || nbytesread < privep->ep.maxpacket)
{
usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd);
lpc214x_reqcomplete(privep, OK);