Integral size mismatch (take 2)

From: George (greerga@CIRCLEMUD.ORG)
Date: 08/25/98


On a suggestion from d. Hall, someone in Windows please see if this fixes
the problem:

diff -up stk/db.c conv/db.c
--- stk/db.c    Thu Jun 25 00:44:38 1998
+++ conv/db.c   Tue Aug 25 11:10:07 1998
@@ -29,7 +29,7 @@

**************************************************************************/

 struct room_data *world = NULL;        /* array of rooms                */
-int top_of_world = 0;          /* ref to top element of world   */
+room_rnum top_of_world = 0;    /* ref to top element of world   */

 struct char_data *character_list = NULL;       /* global linked list of
                                                 * chars         */

(Note that this may cause other warnings elsewhere, I'm only interested in
the previously warned about places, such as act.movement.c:129.)

If not, try it in addition to the previous one:


diff -up stk/utils.h conv/utils.h
--- stk/utils.h Sun Jun 21 00:19:07 1998
+++ conv/utils.h        Mon Aug 24 13:01:31 1998
@@ -224,8 +224,10 @@ void       update_pos(struct char_data *victim

 #define IS_LIGHT(room)  (!IS_DARK(room))

-#define GET_ROOM_VNUM(rnum)    ((rnum) >= 0 && (rnum) <= top_of_world ? world[(rnum)].number : NOWHERE)
-#define GET_ROOM_SPEC(room) ((room) >= 0 ? world[(room)].func : NULL)
+#define GET_ROOM_VNUM(rnum)    \
+       ((rnum) >= 0 && (rnum) <= top_of_world ? world[(rnum)].number : (room_vnum)NOWHERE)
+#define GET_ROOM_SPEC(room)    \
+       ((room) >= 0 && (room) <= top_of_world ? world[(room)].func : NULL)

 /* char utils
************************************************************/

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://mouse.van.ml.org/ (not done) | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | 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/15/00 PST