# HG changeset patch # User michael # Date 1102861194 0 # Node ID 8d1983254e289be58935c3c66edfcb70b4530328 # Parent 4605a8b188c35dfee7b174042dec2b530e8fee54 flush remaining data from parser at EOF diff -r 4605a8b188c3 -r 8d1983254e28 parser.c --- a/parser.c Sat Dec 11 18:33:18 2004 +0000 +++ b/parser.c Sun Dec 12 14:19:54 2004 +0000 @@ -187,7 +187,12 @@ for(; pc->overread>0; pc->overread--){ pc->buffer[pc->index++]= pc->buffer[pc->overread_index++]; } - + + /* flush remaining if EOF */ + if(!*buf_size && next == END_NOT_FOUND){ + next= 0; + } + pc->last_index= pc->index; /* copy into buffer end return */