Re: showstr_point/head

From: Sammy (samedi@clark.net)
Date: 12/28/95


On Wed, 27 Dec 1995, Steve wrote:

> I dunno what I did, but a little after changing the alias char from $ to 
> % i noticed that occasionally when paging you would get bizzar crap at 
> the end of your page.
[...]
> 
>                                    IMMORTALS
>    Kalanor
> 
> *** Press return to continue, q to quit ***
> ]
> Carried: weight: 0, items: 0; Items in: inventory: 0, eq: 0
> Hunger: -1, Thirst: -1, Drunk: -1, Bladder: 0
> Master is: <none>, Followers are: Probe
> 
> now i did nothing to change showstr_point/head which is what i believe 
> controls what text you get to page through, are there any ideas on what 
> could have happened for this to happen?

I'm not sure what you might have changed to start getting that problem, 
but I know of a fix that should take care of it.  In file 
act.informative.c, in function do_gen_ps, change the following:

  case SCMD_WIZLIST:
    page_string(ch->desc, wizlist, 0);

To:

  case SCMD_WIZLIST:
    page_string(ch->desc, wizlist, 1);

When I added paging to who and where I had the same symptoms show up.  
Changing the 0 to 1 fixed it.  From what I found (I didn't probe too 
deeply) it looks like the 1 (int keep_internal) will allocate memory for 
the string so it doesn't get overwritten between pages.  I think it's 
probably safe to assume that the memory is freed when the string is 
finished.

Sam



This archive was generated by hypermail 2b30 : 12/07/00 PST