Changeset 4989:be7f633988f4 in roaraudio


Ignore:
Timestamp:
05/20/11 13:38:04 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

yet another reallocation correction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/buffer.c

    r4988 r4989  
    428428  } 
    429429 
    430   totlen = buf->len - buf->user_len + len; 
     430  totlen = (buf->len - buf->user_len) + len; 
    431431  newbuf = roar_mm_realloc(buf->data, totlen); 
    432432  if ( newbuf == NULL ) 
     
    434434 
    435435  buf->user_data = newbuf + (buf->user_data - buf->data); 
     436  buf->user_len = len; 
    436437  buf->data = newbuf; 
    437   buf->user_len = len; 
     438  buf->len  = totlen; 
    438439 } else { 
    439440  buf->user_len = len; 
Note: See TracChangeset for help on using the changeset viewer.