Re: Why does this cause an segmentation fault? 98 00:40:13 am"

From: Christian Loth (sg618lo@unidui.uni-duisburg.de)
Date: 11/27/98


Greetings again,

Ronny Iversen wrote:
> Christian Loth wrote:
>
> > Greetings,
> >
> > Ronny Iversen wrote:
> > >   i = "someone";
            ^^^^^^^^^  this is a pointer to a constant string literal.

What you want is:

i = strdup("someone"); and then: CAP(i);


> > >   CAP(i);
> >
> > You're trying to change a constant...big nono.
> >
> > - Chris
>

Hope that helps,

- Chris

--
/----------------------------------------------------------------------------\
| Christian Loth, chris@rom.mud.de    |           REALM OF MAGIC             |
| http://rom.mud.de/~chris            | telnet rom.mud.de 4000               |
|                                     | http://rom.mud.de/                   |
\----------------------------------------------------------------------------/


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