Changeset 987


Ignore:
Timestamp:
Feb 20, 2007 3:26:55 PM (18 years ago)
Author:
bennylp
Message:

Fixed ticket #118: Bug in pj_array_insert() when position is equal to count-1

Location:
pjproject/branches/pjproject-0.5-stable/pjlib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/pjproject-0.5-stable/pjlib/include/pj/array.h

    r974 r987  
    4343 * @param array     the array. 
    4444 * @param elem_size the size of the individual element. 
    45  * @param count     the current number of elements in the array. 
     45 * @param count     the CURRENT number of elements in the array. 
    4646 * @param pos       the position where the new element is put. 
    4747 * @param value     the value to copy to the new element. 
  • pjproject/branches/pjproject-0.5-stable/pjlib/src/pj/array.c

    r974 r987  
    2828                              const void *value) 
    2929{ 
    30     if (count && pos < count-1) { 
     30    if (count && pos < count) { 
    3131        pj_memmove( (char*)array + (pos+1)*elem_size, 
    3232                    (char*)array + pos*elem_size, 
Note: See TracChangeset for help on using the changeset viewer.