Changeset 986


Ignore:
Timestamp:
Feb 20, 2007 2:58:40 PM (12 years ago)
Author:
bennylp
Message:

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

Location:
pjproject/trunk/pjlib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/array.h

    r974 r986  
    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/trunk/pjlib/src/pj/array.c

    r974 r986  
    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.