1 | |
1 | |
2 | /* |
2 | /* |
3 | * static char *rcsid_c_wiz_c = |
3 | * static char *rcsid_c_wiz_c = |
4 | * "$Id: c_wiz.C,v 1.9 2006/09/10 14:15:34 root Exp $"; |
4 | * "$Id: c_wiz.C,v 1.10 2006/09/10 14:54:02 root Exp $"; |
5 | */ |
5 | */ |
6 | |
6 | |
7 | /* |
7 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
8 | CrossFire, A Multiplayer game for X-windows |
9 | |
9 | |
… | |
… | |
818 | else |
818 | else |
819 | { |
819 | { |
820 | for (i = 0; i < (set_nrof ? nrof : 1); i++) |
820 | for (i = 0; i < (set_nrof ? nrof : 1); i++) |
821 | { |
821 | { |
822 | archetype *atmp; |
822 | archetype *atmp; |
823 | object *prev = NULL, *head = NULL, *dup; |
823 | object *prev = 0, *head = 0; |
824 | |
824 | |
825 | for (atmp = at; atmp != NULL; atmp = atmp->more) |
825 | for (atmp = at; atmp; atmp = atmp->more) |
826 | { |
826 | { |
827 | dup = arch_to_object (atmp); |
827 | object *dup = arch_to_object (atmp); |
828 | |
828 | |
829 | if (at_spell) |
829 | if (at_spell) |
830 | insert_ob_in_ob (arch_to_object (at_spell), dup); |
830 | insert_ob_in_ob (arch_to_object (at_spell), dup); |
831 | |
831 | |
832 | /* |
832 | /* |
833 | * The head is what contains all the important bits, |
833 | * The head is what contains all the important bits, |
834 | * so just copying it over should be fine. |
834 | * so just copying it over should be fine. |
835 | */ |
835 | */ |
836 | if (head == NULL) |
836 | if (!head) |
837 | { |
837 | { |
838 | head = dup; |
838 | head = dup; |
839 | copy_object (tmp, dup); |
839 | copy_object (tmp, dup); |
840 | } |
840 | } |
841 | |
841 | |