# HG changeset patch # User reimar # Date 1150020573 0 # Node ID 725b291bf94f4d7adaef42fe2534f6a144a381f1 # Parent 5dbdfa87d0d8f1141addee262e57f4020dfe6fc6 read_packet return value must be < 0 when no packet is returned, including EOF. diff -r 5dbdfa87d0d8 -r 725b291bf94f nuv.c --- a/nuv.c Sat Jun 10 12:30:51 2006 +0000 +++ b/nuv.c Sun Jun 11 10:09:33 2006 +0000 @@ -186,7 +186,7 @@ while (!url_feof(pb)) { ret = get_buffer(pb, hdr, HDRSIZE); if (ret <= 0) - return ret; + return ret ? ret : -1; frametype = hdr[0]; size = PKTSIZE(LE_32(&hdr[8])); switch (frametype) {