[BUG] [PATCH] change >= 0 to != NOBODY in list_detailed_shop()

From: The Fungi (fungi@yuggoth.org)
Date: 07/08/02


In the latest CVS snapshot (and possibly back to bpl20) there is a
hard-coded check in shop.c's list_detailed_shop() function to see
"if (SHOP_KEEPER(shop_nr) >= 0)" which would be an always true
condition compiling with CIRCLE_UNSIGNED_INDEX turned on. Patch:

-----BEGIN PATCH-----
diff -Npru old/src/shop.c new/src/shop.c
--- old/src/shop.c      Fri Jun 21 13:38:06 2002
+++ new/src/shop.c      Tue Jul  9 00:58:24 2002
@@ -1372,7 +1372,7 @@ void list_detailed_shop(struct char_data
     send_to_char(ch, "Rooms:      None!");

   send_to_char(ch, "\r\nShopkeeper: ");
-  if (SHOP_KEEPER(shop_nr) >= 0) {
+  if (SHOP_KEEPER(shop_nr) != NOBODY) {
     send_to_char(ch, "%s (#%d), Special Function: %s\r\n",
        GET_NAME(&mob_proto[SHOP_KEEPER(shop_nr)]),
        mob_index[SHOP_KEEPER(shop_nr)].vnum,
-----END PATCH-----

I'm assuming this was just a straggler that got overlooked following
the update to unsigned short int indicies. I have been wrong before.
--
{ IRL(Jeremy_Stanley); PGP(9E8DFF2E4F5995F8FEADDC5829ABF7441FB84657);
SMTP(fungi@yuggoth.org); IRC(fungi@irc.yuggoth.org#ccl); ICQ(114362511);
AIM(dreadazathoth); YAHOO(crawlingchaoslabs); FINGER(fungi@yuggoth.org);
MUD(Nergel@mud.yuggoth.org:2325); WWW(http://fungi.yuggoth.org/); }

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