[CODE][ERRORS]Clan.c

From: Demond LaZaro (demond@TOLKIEN.REALMS.ORG)
Date: 01/07/98


Ok Gdb is giveing me some wierd responce with a bit of my new clan code
Here's the errors:
Core was generated by `bin/circle -q 6050'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.5.3.12...done.
Reading symbols from /lib/ld-linux.so.1...done.
#0  0x4003c2d3 in _IO_vfprintf ()

And the Code:
ACMD(do_complist)
{
  int i;
  char buf[10];

  for (i = 1; i < MAX_CLAN; i++) {
    sprintf(buf, "%s Company\r\n", clan[MAX_CLAN].clan_name);
  }
  sprintf(buf, "%sThanxs for useing Company Directorys.\r\nUser %s\r\n",
        buf, GET_NAME(ch));
  sprintf(buf, "%sDisconected.....\r\n", buf);
  send_to_char(buf, ch);
  return;
}

clan[MAX_CLAN].clan_name might be doing it so heres the const structs
(clan name is the second value):
const struct clan_data clan[MAX_CLAN] = {
   {0, "Dragon", "-=D=-", 3001},
   {1, "Griffon", "-=G=-", 3001},

   /* Add new clans here */
/*   {-1, NULL, NULL, -1} */
};

Thanx,
Demond



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name: Demond LaZaro the Implementor     Phone: 1-505-776-8866
Mud: Master's Realm Mud                 Code Base: CircleMud bpl11
Addy: realms.org 6969                   Addy2: 206.185.32.8 6969
Mud2: Towers from Beyond 2              Code Base: CircleMud bpl12
Addy: realms.org 6050                   Addy2: 206.185.32.8 6050
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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