> >>How big is the buffer #1 gives to #0?
> >
> >heh, how do i check that? (havent much experience with gdb)
>
>Look at the code...
>
>--
>George Greer | Shirak's CircleMUD for Windows help
>greerga@circlemud.org | http://shirak.circlemud.net/
hmm...
-------------------------------------------------------------------
#0 0x80a6f8d in fbgetline (fbfl=0x4015ffe8, line=0xbffffa34 "@")
at diskio.c:23
#1 0x807603c in build_player_index () at db.c:461
#2 0x8075cb6 in boot_db () at db.c:326
#3 0x807133c in init_game (port=4000) at comm.c:344
#4 0x80712e5 in main (argc=3, argv=0xbffffc14) at comm.c:320
#5 0x4005ecb3 in __libc_start_main (main=0x8071080 <main>, argc=3,
argv=0xbffffc14, init=0x80491fc <_init>, fini=0x80aa51c <_fini>,
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffc0c)
at ../sysdeps/generic/libc-start.c:78
(gdb)
db.c
---------------------------------------------------------------
/* count the number of players in the index */
while(fbgetline(plr_index, line))
if(*line != '~')
rec_count++; <-------- line 461
fbrewind(plr_index);
---------------------------------------------------------------
diskio.c
----------------------------------------------------------------
int fbgetline(FBFILE *fbfl, char *line)
{
char *r = fbfl->ptr, *w = line;
if(!fbfl || !line || !*fbfl->ptr)
return FALSE;
for(; *r && *r != '\n' && r <= fbfl->buf + fbfl->size; r++) <-- 23
*(w++) = *r;
while(*r == '\r' || *r == '\n')
r++;
*w = '\0';
if(r > fbfl->buf + fbfl->size)
return FALSE;
else {
fbfl->ptr = r;
return TRUE;
}
}
--------------------------------------------------------------------
ok, if i pwipe it all, leaving no characters in player index, and
make one new character, this seems to work very good,
not crashing olc or when adding anything to player struct i think.
however if i make another character, adding one to the player index
this is the core dump i get (above).
So it looks as if it bug, if there is more then one entry in the
player index...
Know what might be wrong? :P
/Emil
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST