diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-02-20 14:58:40 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-02-20 14:58:40 +0000 |
commit | e288aba10e7bd0ba89ea24c4a267bd40a3a4d38d (patch) | |
tree | 571e88d072eaa1f751ec10167d3f4389f38fb002 /pjlib/src | |
parent | 6bfdf650518b480b495f6f720a4fd6e6b4fd4f51 (diff) |
Fixed ticket #117: Bug in pj_array_insert() when position is equal to count-1
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@986 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src')
-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); |