On Thu, Nov 01, 2001 at 11:15:05PM -0000, Ian Collyer wrote: > Jef Waite wrote: > > > > Ok, I checked the mailling list archives and couldn't find anything about > > this in them. So I figured I'd ask here, to see if I'm imagining things, > > or just need more sleep. > > > > Anyways, in save.c in the fread_pet function, there are several places > > where it reads in a string: > > KEY( "LnD", pet->long_descr, fread_string(fp)); > > > > > > Same for name, short_descr, and description. Now these normally don't get > > saved unless they are different from pIndexData version, but > > shouldn't those > > all be KEYS instead of KEY? > > > > It does a create_mobile which sets those values. > > > > Am I losing it, or is it possible to be leaking memory if players get > > creative with their pets? > > > > Thanks, > > > > Jef > > Get some more sleep ;) > > If KEYS were used it'd free the strings in the mob index, surely not what we > want. > > [ create_mobile() uses 'mob->long_descr = pMobIndex->long_descr;' giving a > reference for standard descriptions, not a strcpy() ]
Euh yes, but free_string() doesn't free memory which is in the assigned to mob/room/object indexes. Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org [EMAIL PROTECTED] | Interested in MUDs? Visit Fatal Dimensions: ------------------+ http://www.FatalDimensions.org/

