Fixed a bug in find_shop (shop.c) and real_shop (genshp.c) - see http://www.tbamud.com/forum?c=showthread&ThreadID=447

This commit is contained in:
JamDog
2009-03-07 20:54:15 +00:00
parent 2f47416576
commit b35073602f
3 changed files with 15 additions and 13 deletions

View File

@@ -35,6 +35,8 @@ export (QQ's a zone into a tarball)t
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist) Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
(lots of major bugfixes too) (lots of major bugfixes too)
tbaMUD 3.59 tbaMUD 3.59
[Mar 07 2009] - Jamdog
Fixed a bug in find_shop (shop.c) and real_shop (genshp.c) (Thanks Slicer)
[Feb 25 2009] - Jamdog [Feb 25 2009] - Jamdog
Fixed new medit stats menu so that it uses the the Advanced/Standard cedit toggle Fixed new medit stats menu so that it uses the the Advanced/Standard cedit toggle
[Feb 24 2009] - Jamdog [Feb 24 2009] - Jamdog

View File

@@ -258,7 +258,7 @@ shop_rnum real_shop(shop_vnum vnum)
top = top_shop; top = top_shop;
/* perform binary search on shop_table */ /* perform binary search on shop_table */
while (bot < top) { while (bot <= top) {
mid = (bot + top) / 2; mid = (bot + top) / 2;
if (SHOP_NUM(mid) == vnum) if (SHOP_NUM(mid) == vnum)
return (mid); return (mid);

View File

@@ -1549,7 +1549,7 @@ static int find_shop(int vnum)
int bot, mid, ltop; int bot, mid, ltop;
bot = 0; bot = 0;
ltop= top_shop - 1; ltop= top_shop;
while (bot <= ltop) { while (bot <= ltop) {
mid = (ltop + bot) / 2; mid = (ltop + bot) / 2;