[1121] in Coldmud discussion meeting

root meeting help first previous next next in chain last in chain last

[COLD] Bugfix patch for p17

daemon@ATHENA.MIT.EDU (Tue Nov 5 01:55:27 1996 )

Date: Mon, 4 Nov 1996 21:50:40 -0800 (PST)
From: Brian Buchanan <brian@wasteland.calbbs.com>
To: coldstuff@cold.org
In-Reply-To: <Pine.NEB.3.95.961104211325.13628A-100000@glacier.cold.org>


Looks like Brandon was in a bit of a hurry preparing p17.  I found two 
errors in the source relating to my bugfixes for this release.  One isn't 
of much worry unless you're programming with frob methods.  The other 
will almost certainly crash the driver if you use find_method() anywhere.

Patch follows:

*** ./execute.c.old	Mon Nov  4 21:15:09 1996
--- ./execute.c	Mon Nov  4 21:36:21 1996
***************
*** 973,978 ****
--- 973,985 ----
      if (!obj)
          call_error(CALL_ERR_OBJNF);
  
+     /* If we're executing as a frob method, treat any method calls to
+        this() as if it were a frob call */
+ 
+     if (cur_frame && cur_frame->is_frob == FROB_YES &&
+         cur_frame->object->objnum == objnum)
+ 	is_frob = FROB_YES;
+ 
      /* Find the method to run. */
      method = object_find_method(objnum, name, is_frob);
      if (!method) {
*** ./data/object.c.old	Mon Nov  4 21:39:11 1996
--- ./data/object.c	Mon Nov  4 21:39:39 1996
***************
*** 479,491 ****
      m2 = object_find_method(cur_frame->object->objnum, SYM1, FROB_NO);
      if (!m)
          m = m2;
!     else if (m2 &&
!         object_has_ancestor(m2->object->objnum, m->object->objnum))
!     {
!         cache_discard(m->object);
!         m = m2;
!     } else
!         cache_discard(m2->object);
  
      pop(1);
      if (m) {
--- 479,491 ----
      m2 = object_find_method(cur_frame->object->objnum, SYM1, FROB_NO);
      if (!m)
          m = m2;
!     else if (m2) {
! 	if (object_has_ancestor(m2->object->objnum, m->object->objnum)) {
!             cache_discard(m->object);
!             m = m2;
!     	} else
!             cache_discard(m2->object);
!     }
  
      pop(1);
      if (m) {

--- CUT HERE ---


Brian