Re: [CODE] Crashing

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 04/01/98


1) declaring buf again.... NO!
2) fili, please tell me this is an april fools prank, and not real code.  where
does memory that this NULL ptr point to get created?

This type of error is what george's buffer system is great for catching.

--Angus - Wondering when the release of bpl13 will be announced today

(darn tradition)


______________________________ Forward Header __________________________________
Subject: Re:  [CODE] Crashing
Author:  INTERNET:CIRCLE@POST.QUEENSU.CA at CSERVE
Date:    4/1/98 9:02 AM

Suggestion:

peter hartman wrote:
> <snip>
> ACMD(do_players)
> {
>   FILE *fl;
>   struct char_file_u player;
>   int done=FALSE;
>   char buf[MAX_STRING_LENGTH];
            ^^^^^^^^^^^^^^^^^^^^
Change to char *buf;

>   char arg1[MAX_INPUT_LENGTH], arg2[MAX_INPUT_LENGTH];
>   int lowl, highl;
<snip>

That should add some length to the string.


     +------------------------------------------------------------+
     | 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