diff options
author | Alexandra Ellwood <lxs@mit.edu> | 2007-09-18 19:48:19 +0000 |
---|---|---|
committer | Alexandra Ellwood <lxs@mit.edu> | 2007-09-18 19:48:19 +0000 |
commit | 426ef0b9515cc14e34ec0f6ef2ce13f7d9e9ec4b (patch) | |
tree | 910a1366cf613d625aaa96e7b401f86187da0d3e /src | |
parent | f96d4b689b6762fe594eb089abb4a5e0a0f3ca1d (diff) | |
download | krb5-426ef0b9515cc14e34ec0f6ef2ce13f7d9e9ec4b.tar.gz krb5-426ef0b9515cc14e34ec0f6ef2ce13f7d9e9ec4b.tar.xz krb5-426ef0b9515cc14e34ec0f6ef2ce13f7d9e9ec4b.zip |
cci_array_move should work when the source and dest positions are equal
Fixed so it does nothing when moving an element to its own index.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19950 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/ccapi/common/cci_array_internal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ccapi/common/cci_array_internal.c b/src/ccapi/common/cci_array_internal.c index 3d1e35ef3d..37ff695e3c 100644 --- a/src/ccapi/common/cci_array_internal.c +++ b/src/ccapi/common/cci_array_internal.c @@ -270,7 +270,8 @@ cc_int32 cci_array_move (cci_array_t io_array, move_to = in_position; move_count = in_new_position - in_position - 1; real_new_position = in_new_position - 1; - } else { + + } else if (in_position > in_new_position) { /* shift left */ move_from = in_new_position; move_to = in_new_position + 1; |