On Wed, Feb 13, 2002 at 05:22:30PM -0600, Mike Barton wrote: > > IMHO trying to do this: > > ch->max_hit = class_table[ch->class].hp_base > > inside of new_char is just plain dumb, until they choose a class > > there is no _valid_ data in that variable. Or is that too simplistic > > a view? > > That's perfectly legitimate. > But don't blame the calloc :) Blame ROM's memory recycling.
The recycling stuff is working okay, but peoples extensions to it (either in old structures or in new structures) are bad: - People forget to free_string() the newly added char *'s in the structures. - People forget to invalidate the freed memory and the validate newed memory. - People forget to clear the newly allocated (either via malloc or the one from the free-list) memory. Don't blame the design, blame the coders. Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org [EMAIL PROTECTED] | Interested in MUDs? Visit Fatal Dimensions: ------------------+ http://www.FatalDimensions.org/

