Well, my MUD stopped crashing when I put this:
if (ch->desc)
strncpy(st.host, ch->desc->host, HOST_LENGTH);
else
strcpy(st.host, "UNKNOWN");
st.host[HOST_LENGTH] = '\0';
in place of
strncpy(st.host, ch->desc->host, HOST_LENGTH);
st.host[HOST_LENGTH] = '\0';
Which was what the latest CVS snapshot gave me (WITH the MOB_ISNPC check).
What's that look like in your save_char, db.c ?
[-------------------------------------------]
Tony Robbins, <tonyr@nwpaclink.com>
LakeView Technologies, Inc.
[-------------------------------------------]
On Tue, 22 Sep 1998, George wrote:
> On Mon, 21 Sep 1998, Tony Robbins [Kupek] wrote:
>
> >Just so you all know, the bug still exists in the CVS snapshot for
> >linkloading and stating players in their file.
> >(the changing of the IS_NPC define does not change it)
>
> Might help to know the version you're using. :)
>
> Because with my current version:
> 500H 100M 82V > stat file bob
> MALE PC 'Bob' IDNum: [ 2], In room [ 0]
> Title: the Immortal Warlock
> L-Des: <None>
> Class: Magic User, Lev: [31], XP: [8000000], Align: [ 0]
> Created: [Sat Sep 12], Last Logon: [Mon Sep 21], Played [0h 5m], Age [17]
> Hometown: [1], Speaks: [0/0/0], (STL[186]/per[45]/NSTL[3])
> Str: [13/0] Int: [17] Wis: [16] Dex: [14] Con: [11] Cha: [10]
> Hit p.:[173/173+6] Mana p.:[649/649+16] Move p.:[167/167+20]
> Coins: [ 0], Bank: [ 0] (Total: 0)
> AC: [100/10], Hitroll: [ 0], Damroll: [ 0], Saving throws: [0/0/0/0/0]
> Pos: Standing, Fighting: Nobody
> Default position: Standing, Idle Timer (in tics) [0]
> PLR: SITEOK
> PRF: COMPACT D_HP D_MANA D_MOVE AUTOEX !HASS LIGHT C1 C2 RMFLG
> Carried: weight: 0, items: 0; Items in: inventory: 0, eq: 0
> Hunger: -1, Thirst: -1, Drunk: -1
> Master is: <none>, Followers are:
> AFF: NOBITS
> 500H 100M 82V >
>
> "current version" being one with IS_NPC() put back to MOB_ISNPC check.
>
> -#define IS_NPC(ch) (IS_SET(MOB_FLAGS(ch), MOB_ISNPC))
> -#define IS_MOB(ch) (IS_NPC(ch) && ((ch)->nr >-1))
> +#define IS_NPC(ch) (IS_SET(MOB_FLAGS(ch), MOB_ISNPC))
> +/* #define IS_NPC(ch) (GET_PFILEPOS(ch) == -1) Not yet. */
> +#define IS_MOB(ch) (IS_NPC(ch) && GET_MOB_RNUM(ch) >= 0)
>
> That is from 98092022-bpl14.patch.gz
>
> --
> George Greer, greerga@circlemud.org | Genius may have its limitations, but
> http://mouse.van.ml.org/ (mostly) | stupidity is not thus handicapped.
> http://www.van.ml.org/CircleMUD/ | -- Elbert Hubbard
>
>
> +------------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
> +------------------------------------------------------------+
>
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST