input/Curl: break loop when remaining length becomes 0

Fixes assertion failure (regression).
This commit is contained in:
Max Kellermann 2013-01-15 23:39:32 +01:00
parent 49e79620fd
commit 452a30d7af

View File

@ -776,6 +776,9 @@ read_from_buffer(IcyMetaDataParser &icy, std::list<CurlInputBuffer> &buffers,
buffers.pop_front();
break;
}
if (length == 0)
break;
}
chunk = icy.Meta(buffer.Begin(), length);
@ -788,6 +791,9 @@ read_from_buffer(IcyMetaDataParser &icy, std::list<CurlInputBuffer> &buffers,
buffers.pop_front();
break;
}
if (length == 0)
break;
}
}