(elem_insert): fix a off by one index counter

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12628 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-08-25 11:28:46 +00:00
parent 61413db01f
commit 575766e5e7
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ elem_insert(struct gss_msg_order *o,
if (o->length > after_slot) if (o->length > after_slot)
memmove(&o->elem[after_slot + 1], &o->elem[after_slot], memmove(&o->elem[after_slot + 1], &o->elem[after_slot],
(o->length - after_slot) * sizeof(o->elem[0])); (o->length - after_slot - 1) * sizeof(o->elem[0]));
elem_set(o, after_slot, seq_num); elem_set(o, after_slot, seq_num);

View File

@@ -105,7 +105,7 @@ elem_insert(struct gss_msg_order *o,
if (o->length > after_slot) if (o->length > after_slot)
memmove(&o->elem[after_slot + 1], &o->elem[after_slot], memmove(&o->elem[after_slot + 1], &o->elem[after_slot],
(o->length - after_slot) * sizeof(o->elem[0])); (o->length - after_slot - 1) * sizeof(o->elem[0]));
elem_set(o, after_slot, seq_num); elem_set(o, after_slot, seq_num);