Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
AFKMud 2.2.2
Mar 3, 2019 5:35 pm
By Samson
Development
Nov 28, 2018 12:10 pm
By Keirath
First Immortal
Oct 12, 2018 2:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018 7:31 pm
By joeyfogas
question on overland code
May 31, 2018 12:03 pm
By joeyfogas
SmaugFUSS 1.9.3
Author: Various
Submitted by: Samson
AFKMud 2.2.2
Author: AFKMud Team
Submitted by: Samson
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Bing, Sogou

Members: 0
Guests: 15
Stats
Files
Topics
Posts
Members
Newest Member
483
3,743
19,401
655
RodrickMci
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] Old ibuild code chunks ...
Forum Rules | Mark all | Recent Posts

[Bug] Old ibuild code chunks cause crashes when called from redit
< Newer Topic :: Older Topic > AFKMud 1.77

Pages:<< prev 1 next >>
Post is unread #1 Dec 2, 2006 10:31 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,647
JoinedJan 1, 2002

Bug: Old ibuild code chunks cause crashes when called from redit
Danger: High - Crash condition. Orphaned code which should have been deleted a long time ago.
Discovered in: AFKMud 1.77
Found by: Samson
Fixed by: Samson/Remcon

---

build.c, do_redit

Find and remove:
   if( !str_cmp( arg, "ex_flags" ) )
   {
      argument = one_argument( argument, arg2 );

      value = get_exflag( arg2 );
      if( value < 0 )
      {
         send_to_char( "Bad exit flag. \r\n", ch );
         return;
      }
      if( ( xit = get_exit( location, edir ) ) == NULL )
      {
         snprintf( buf, MAX_STRING_LENGTH, "exit %c 1", dir );
         do_redit( ch, buf );
         xit = get_exit( location, edir );
      }
      TOGGLE_BIT( xit->exit_info, 1 << value );
      return;
   }


   if( !str_cmp( arg, "ex_to_room" ) )
   {
      argument = one_argument( argument, arg2 );
      evnum = atoi( arg2 );
      if( evnum < 1 || evnum > MAX_VNUM )
      {
         send_to_char( "Invalid room number.\r\n", ch );
         return;
      }
      if( ( tmp = get_room_index( evnum ) ) == NULL )
      {
         send_to_char( "Non-existant room.\r\n", ch );
         return;
      }
      if( ( xit = get_exit( location, edir ) ) == NULL )
      {
         snprintf( buf, MAX_STRING_LENGTH, "exit %c 1", dir );
         do_redit( ch, buf );
         xit = get_exit( location, edir );
      }
      xit->vnum = evnum;
      return;
   }

   if( !str_cmp( arg, "ex_key" ) )
   {
      argument = one_argument( argument, arg2 );
      if( ( xit = get_exit( location, edir ) ) == NULL )
      {
         snprintf( buf, MAX_STRING_LENGTH, "exit %c 1", dir );
         do_redit( ch, buf );
         xit = get_exit( location, edir );
      }
      xit->key = atoi( arg2 );
      return;
   }

   if( !str_cmp( arg, "ex_exdesc" ) )
   {
      if( ( xit = get_exit( location, edir ) ) == NULL )
      {
         snprintf( buf, MAX_STRING_LENGTH, "exit %c 1", dir );
         do_redit( ch, buf );
      }
      snprintf( buf, MAX_STRING_LENGTH, "exdesc %c %s", dir, argument );
      do_redit( ch, buf );
      return;
   }

   if( !str_cmp( arg, "ex_keywords" ) )   /* not called yet */
   {
      if( ( xit = get_exit( location, edir ) ) == NULL )
      {
         snprintf( buf, MAX_STRING_LENGTH, "exit %c 1", dir );
         do_redit( ch, buf );
         if( ( xit = get_exit( location, edir ) ) == NULL )
            return;
      }
      snprintf( buf, MAX_STRING_LENGTH, "%s %s", xit->keyword, argument );
      STRFREE( xit->keyword );
      xit->keyword = STRALLOC( buf );
      return;
   }


These code blocks were left over from when the old ibuild interface code was still around. That interface was horribly broken and basically beyond repair so it was taken out. The orphaned leftovers of it still crop up from time to time, and these blocks in do_redit are crash traps waiting to happen.
       
Pages:<< prev 1 next >>