--- deliantra/server/common/anim.C 2006/09/03 00:18:39 1.4 +++ deliantra/server/common/anim.C 2006/09/03 07:57:54 1.5 @@ -1,6 +1,6 @@ /* * static char *rcsid_anim_c = - * "$Id: anim.C,v 1.4 2006/09/03 00:18:39 root Exp $"; + * "$Id: anim.C,v 1.5 2006/09/03 07:57:54 root Exp $"; */ /* @@ -83,10 +83,10 @@ } num_animations++; - animations.resize (num_animations + 1); - animations[num_animations].name = buf + 5; - animations[num_animations].num = num_animations; /* for bsearch */ - animations[num_animations].facings = 1; + Animations &anim = animations.at (num_animations); + anim.name = buf + 5; + anim.num = num_animations; /* for bsearch */ + anim.facings = 1; } else if (!strncmp(buf,"mina",4)) { animations[num_animations].faces = (Fontindex *) malloc(sizeof(Fontindex)*num_frames); @@ -129,7 +129,7 @@ search.name = name; - match = (Animations*)bsearch(&search, animations, (num_animations+1), + match = (Animations*)bsearch(&search, &animations [0], (num_animations+1), sizeof(Animations), (int (*)(const void*, const void*))anim_compare);