[Circle] [code] [bug report] castle.c

From: root (root@federation.osp.nl)
Date: 11/06/96


Hi all,

As I was debugging Oasis OLC I found a weird bug in code I hadn't touched (!!)
yet (Dunno if it exists in all circle patchlevels). If you check castle.c there 
is a routine which assigns all castle procs. This routine uses a macro which is
allso defined in castle.c : 
	C_MOB_SPEC(zone,mob) (mob_index[real_mobile(((zone)*100)+(mob))].func)
Well I found out that when the code to try assign mob 15000 (which does not exist
in my 150.mob) the macro does the following : mob_index[-1].func = blahblah
							^^
							----- outcome of real_mobile!
Well, this prevented the mob_index from ever to be freed without a crash!
It should crash at the assignment but HPUX, Linux and AIX didn't crash, they
only crashed when you try to free mob_index. 

Hope this helps y'all,

Aragorn
root@federation.osp.nl
-- 
-----------------------------------
[   ^         .sig            ^   ]
[  /0\  Under Construction   /0\  ]
[  ---                       ---  ]
-----------------------------------
|Try: telnet ftp.rijnhaave.nl 4000|
-----------------------------------
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST