Memory (all alone in the moonlight, urm, nevermind)

From: Chuck Reed (creed@I-55.COM)
Date: 03/04/98


Argle bargle!

This overwriten stack crap is enough to make me wanna kill things.

I have added this to my prompt code (trying to make sure
MAX_STRING_LENGTH[8129 on my mud])

for (;count < 801;count++) {
   if(*str == '&')
       prompt_count += 8;
    else
       prompt_count++;
   }

if(prompt_count >= 800) {
   send_to_char("Prompt string is too long, try taking some colors
out.\r\n", ch);
   return str;
 }

It still crashes so I'm just wondering if this code is efficient to check
and make sure the prompt string is under 800 characters (counting &'s as 8
characters for color) and if not, return the already existant prompt_str.

Chuck


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