Re: [BUG] show shops command

From: Daniel A. Koepke (dkoepke@circlemud.org)
Date: 06/21/02


On Fri, 21 Jun 2002, Rowe, Jared H wrote:

> The first bug appears to be in function list_all_shops() in shop.c. Looks
> like every time this function goes through it's loop, it writes over
> everything in buf with the header for each new page.

I committed the following to CVS.  It appears to fix this first bug.

  1320,1322c1320,1324
  <     snprintf(buf + len, sizeof(buf) - len, "%3d   %6d   %6d    %s
  %3.2f   %3.2f    %s\r\n",
  <     shop_nr + 1, SHOP_NUM(shop_nr), SHOP_ROOM(shop_nr, 0), buf1,
  <     SHOP_SELLPROFIT(shop_nr), SHOP_BUYPROFIT(shop_nr),
  customer_string(shop_nr, FALSE));
  ---
  >     len += snprintf(buf + len, sizeof(buf) - len,
  >                "%3d   %6d   %6d    %s   %3.2f   %3.2f    %s\r\n",
  >               shop_nr + 1, SHOP_NUM(shop_nr), SHOP_ROOM(shop_nr, 0),
  buf1,
  >                SHOP_SELLPROFIT(shop_nr), SHOP_BUYPROFIT(shop_nr),
  >                customer_string(shop_nr, FALSE));

I haven't looked at the second bug, yet.

-dak

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