Re: [OLC patch] Error's in modify.c from Daniel Koepke at "Mar 29, 98 05:12:01 pm"

From: Christian Loth (sg618lo@UNIDUI.UNI-DUISBURG.DE)
Date: 03/29/98


> On Sun, 29 Mar 1998, Christian Loth wrote:
>
> ->Use either d->str or (*d).str but I think *d->str doesn't look right.
>
> There is a lesson to be learned here.  Never assume that a variable is
> cast in a particular way.  FYI, "d->str"--directly from structs.h--is
> cast as, "char **d->str".  Which means, "*d->str" is the correct way
> to access a string of characters in d->str (I assume a line), and
> then, that "**d->str" can be used to access single characters of one
> line in d->str.  :)

Of course, thats right, yet the code snippet wasn't referring to single
lines as I saw it, but to the existence of a text (as in: several
strings); first an if-statment to see wheter a text exists at all, and
then a function that 'sends' the text...that's why it didn't seem right.

- Chris


--
/----------------------------------------------------------------------------\
| Christian Loth                      | Meet me as the >Shadowdancer< in the |
| chris@rom.mud.de                    |           REALM OF MAGIC             |
| http://rom.mud.de/~chris            | telnet rom.mud.de 4000               |
|                                     | http://rom.mud.de/                   |
|               "The road goes ever on and on!" - Bilbo Baggins              |
\----------------------------------------------------------------------------/


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