oioi,
That code looks to be ip tracking code for players,
you will keep crashing with it, where you have it,
try putting it in comm.c
From: "oioi" <[EMAIL PROTECTED]>
To: <[email protected]>
Subject: char *str_dup(const char *str ) problem
Date: Mon, 15 Apr 2002 02:11:06 -0400
My problem is this...Every time a character quits from my mud, it crashes.
I ran the debugger to find the exact line it was falling out...and it was
in
the do_quit function when it calls the str_dup function...here...
/*
* After extract_char the ch is no longer valid!
*/
save_char_obj( ch );
id = ch->id;
d = ch->desc;
d->host = str_dup(ch->pcdata->host);
extract_char( ch, TRUE );
if ( d != NULL )
close_socket( d );
Then, when I stepped into the str_dup function, it craps out with an
"Access
violation"...here...
char *str_dup( const char *str )
{
char *str_new;
if ( str[0] == '\0' ) /* Right here, on this line, is where it
craps out*/
return &str_empty[0];
if ( str >= string_space && str < top_string )
return (char *) str;
str_new = alloc_mem( strlen(str) + 1 );
strcpy( str_new, str );
return str_new;
}
The mud was running fine, but for a problem with do_outfit that had to do
with the create_object and a null pObjIndex pointer....
but when I fixed that (a temporary fix, by basically commenting out the
outfit command)...this started happening. When before I could quit out
with
no problem...
and now...even when I uncomment the do_outfit.. it is still having this
problem with the access violation.
Honestly, I am stumped.
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx