Bug in list_one_char()

From: Ken Ray (kenr86@hotmail.com)
Date: 06/28/02


A strange bug with stock patch level 21 - notice the line "Tthe Mayor..."

124H 359M 104V > e
Inside The East Gate Of Midgaard
   You are by two small towers that have been built into the city wall
and connected with a footbridge across the heavy wooden gate.  Main
Street leads west from here.  To the south you see the Water Shop.
Tthe Mayor is standing here.
A cityguard is here, guarding the gate.

124H 359M 103V >

However, later, when I go to the mayor's office:

128H 359M 60V > look
The Mayor's Office
   You are in the not very big office of the Mayor of Midgaard.  A
large and polished but completely empty desk is standing in front of an
armchair that looks so comfortable that it most of all resembles a bed
with the head end raised slightly.
The Mayor is sitting in his huge chair, snoring loudly.

And since I hate politicans sleeping on the job:

129H 359M 65V > wake mayor
You wake him up.

129H 359M 65V > look
The Mayor's Office
   You are in the not very big office of the Mayor of Midgaard.  A
large and polished but completely empty desk is standing in front of an
armchair that looks so comfortable that it most of all resembles a bed
with the head end
raised slightly.
Tthe Mayor is sitting here.

I looked further into this, and I eventually got to the list_one_char
routine in act.informative.c   This is the routine that lists a character
(player or mob), and is indirectly called from do_look.  If the character is
an NPC, and in that mob's default position, the mobs long description is
shown.  Otherwise, the following is called:

  if (IS_NPC(i))
    send_to_char(ch, "%c%s", UPPER(*i->player.short_descr),
                  i->player.short_descr);

followed by a whole string of if tests to add additional information about
the mob.

Have I found the bug?  The send_to_char call has two items it sends, the
first a single character which is the upper case conversion of the first
character in the character's short description.  The next is a string - the
complete short description.

Now, it was obvious with the mayor, because he is ogten not in his default
position.

I guess what is really needed is a variation of the UPPER() function that
will take a complete string, and just capitalize the frist character.





_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT