> It sounds like a dynamically allocated string is being shared by them all,
so
> once it's freed, the pointers in the index are copied over as well.
> Make sure that when the mob is created (create_mobile), it uses str_dup to
> copy the strings from the indexes, instead of just setting it to the
string
> in the index.. This will make sure each mob has its own copy of
non-shared
> strings.
> Just setting it would work fine for shared strings (those loaded at boot
> time), but would screw up strings allocated later (such as created with
OLC
> or string command).
> If that doesn't work, start looking at free_string and str_dup to make
sure
> that they treat shared strings correctly.
I believe this is it. In order for my olc to work correctly I need to
change the load_*'s in db.c? IE:
mob->name = pMobIndex->player_name;
mob->short_descr = pMobIndex->short_descr;
mob->long_descr = pMobIndex->long_descr;
mob->description = pMobIndex->description;
TO:
mob->name = str_dup(pMobIndex->player_name);
etc.
correct??
Let me know if i'm close.
Ark.