Thnx for memcpy/gdb help :)

From: Rasmus R\xnlev (raro94ab@hp4.econ.cbs.dk)
Date: 04/11/96


Well, just wanted to thank everyone who posted me info, seems it was in a 
sprintf() call.. I just took it out.. but take a lookm and tell me WHY it 
segfaults.. beats me :)

[SNIP]
  file = fopen(fn,"wt");
  if (!file)
  {
    sprintf(buf, "ERROR: Unable to get filedescriptor in write_alias()");
    mudlog(buf, NRM, MAX(LVL_JUDGE, GET_INVIS_LEV(ch)), TRUE);
    return;
  }
[END SNIP]

buf is c pointer to a char, and fn is an array of chars (the filename:)

Shouldnt it work flawlessly ? I mean it's not that I don't assign anything
to buf... Well, I'm actually wondering if it's because buf is a pointer 
to a char... should it be an array of chars ? (the mud doesnt crash 
whenever an alias is written though..).

Regards,
Con

d.
--
***************************************************************************
*                            *    Visit my homepage:                      *
*   Rasmus Rønlev DOEK'94    *    http://www.econ.cbs.dk/people/raro94ab  *
*   Student instructor       *    Visit my Multi User Dungeon (MUD):      *
*                            *    ns3.ptd.net 5000 or 198.80.46.3 5000    *   
***************************************************************************
*                                                                         *
*      Student, B.Sc in Computer Science and Business Administration      *
*                                                                         *
***************************************************************************



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