some C99 changes
Instead of using index() macro defined to strchr, use C99 strchr.
Instead of using rindex() macro defined to strrchr, use C99 strrchr.
If you want to try building on a platform that doesn't offer those
two functions, these are available:
define NOT_C99 /* to make some non-C99 code available */
define NEED_INDEX /* to define a macro for index() */
define NEED_RINDX /* to define a macro for rindex() */
This commit is contained in:
@@ -881,7 +881,7 @@ scatter(coordxy sx, coordxy sy, /* location of objects to scatter */
|
||||
}
|
||||
if (!flooreffects(stmp->obj, x, y, "land")) {
|
||||
if (obj_left_shop
|
||||
&& index(u.urooms, *in_rooms(u.ux, u.uy, SHOPBASE))) {
|
||||
&& strchr(u.urooms, *in_rooms(u.ux, u.uy, SHOPBASE))) {
|
||||
/* At the moment this only takes on gold. While it is
|
||||
simple enough to call addtobill for other items that
|
||||
leave the shop due to scatter(), by default the hero
|
||||
|
||||
Reference in New Issue
Block a user