In shop.c, in the function boot_the_shops() there is a line that reads:
SHOP_BUYTYPE(top_shop, count) = (byte) BUY_TYPE(list[count]);
The values on both sides are ints. By casting the right hand side
to byte, SHOP_BUYTYPE gets set to 255 when BUY_TYPE is -1 (at
least it does on my system).
Any function (such as sedit) which attempts to walk through the
shop_data.type index by comparing shop_buy_data.type to -1 will
be in for a nasty surprise.
The fix?
Remove the cast:
SHOP_BUYTYPE(top_shop, count) = BUY_TYPE(list[count]);
and all should work well.
+------------------------------------------------------------+
| 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/08/00 PST