cci_array_move not returning correct new position
authorAlexandra Ellwood <lxs@mit.edu>
Wed, 10 Oct 2007 21:20:00 +0000 (21:20 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Wed, 10 Oct 2007 21:20:00 +0000 (21:20 +0000)
cci_array_move should return correct new position when moving
from and to the same spot.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20115 dc483132-0cff-0310-8789-dd5450dbe970

src/ccapi/common/cci_array_internal.c

index 37ff695e3cff210fe15e2d11a291c554b982f553..d4975ba85fbb54d0221bb0a9c537a7f1f167bd76 100644 (file)
@@ -277,6 +277,9 @@ cc_int32 cci_array_move (cci_array_t  io_array,
             move_to = in_new_position + 1;
             move_count = in_position - in_new_position;     
             real_new_position = in_new_position;
+            
+        } else {
+            real_new_position = in_new_position;
         }
         
         if (move_count > 0) {