Commit 08813ee6 authored by Laurent Aimar's avatar Laurent Aimar

Fixed read(NULL, size) in zipstream.

parent 356372b2
......@@ -253,14 +253,13 @@ static int Read( stream_t *s, void *p_read, unsigned int i_read )
{
stream_sys_t *p_sys = s->p_sys;
if( !p_read ) return 0;
/* Fill the buffer */
if( Fill( s ) )
return -1;
/* Read the buffer */
int i_len = __MIN( i_read, p_sys->i_len - p_sys->i_pos );
unsigned i_len = __MIN( i_read, p_sys->i_len - p_sys->i_pos );
if( p_read )
memcpy( p_read, p_sys->psz_xspf + p_sys->i_pos, i_len );
p_sys->i_pos += i_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment