Commit fb34f081 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Backport 11231 to 0.8.2

parent 1fb7e575
......@@ -100,9 +100,9 @@ block_t *block_Realloc( block_t *p_block, int i_prebody, int i_body )
if( i_body < 0 || i_buffer_size <= 0 ) return NULL;
if( i_prebody < ( p_block->p_buffer - p_block->p_sys->p_allocated_buffer +
p_block->p_sys->i_allocated_buffer ) ||
p_block->p_buffer - i_prebody > p_block->p_sys->p_allocated_buffer )
if( p_block->p_buffer - i_prebody > p_block->p_sys->p_allocated_buffer &&
p_block->p_buffer - i_prebody < p_block->p_sys->p_allocated_buffer +
p_block->p_sys->i_allocated_buffer )
{
p_block->p_buffer -= i_prebody;
p_block->i_buffer += i_prebody;
......
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