diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-02-20 15:26:55 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-02-20 15:26:55 +0000 |
commit | 743547b8cef1835797dc8c052a938f8ee0527a53 (patch) | |
tree | 45002e3910bb1aecf8415c4beb8a8b9a5ed9c63a /pjlib/src/pj/array.c | |
parent | c532c8e2c16d3ae00419376938273ea4cf2dde3b (diff) |
Fixed ticket #118: Bug in pj_array_insert() when position is equal to count-1
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@987 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/array.c')
-rw-r--r-- | pjlib/src/pj/array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pjlib/src/pj/array.c b/pjlib/src/pj/array.c index 0075214e..8d63868f 100644 --- a/pjlib/src/pj/array.c +++ b/pjlib/src/pj/array.c @@ -27,7 +27,7 @@ PJ_DEF(void) pj_array_insert( void *array, unsigned pos, const void *value) { - if (count && pos < count-1) { + if (count && pos < count) { pj_memmove( (char*)array + (pos+1)*elem_size, (char*)array + pos*elem_size, (count-pos)*elem_size); |