Can someone please help me here? For some strange reason, freeing
general_description crashes the mud. I know when the room was originally
created, I used something like:-
world[top_of_world].dir_option[i]->general_description = str_dup("blah
blah");
So, does anyone know what I am doing wrong by trying to free this up?
for (i = 0; i < NUM_OF_DIRS; i++) {
if (world[top_of_world].dir_option[i]) {
if (world[top_of_world].dir_option[i]->general_description)
free(world[top_of_world].dir_option[i]->general_description);
if (world[top_of_world].dir_option[i]->keyword)
free(world[top_of_world].dir_option[i]->keyword);
free(world[top_of_world].dir_option[i]);
}
}
Thanks in advance :)
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST