> > Your problem comes in that if i understand what you are > > asking... you are > > trying to assign in new_char the maxhit instead of nanny... > > and in new_char > > you don't _have_ a ch->class yet... understand? > > yeah you do... > as soon as ch is calloc()'d, you have a full allocated structure.
Referring back to the archives reveals _many_ discussions on the folly of trusting your compiler to properly init things... Sure, once ch is calloc()'d you have the structure, but no valid or trustable values for the sh_int that is ch->class (could be anything). 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? Steve, not so bored at work now!

