Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Google, DotBot

Members: 0
Guests: 20
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SWR FUSS Bugfix List » [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 >

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

Samson
Black Hand
GroupAdministrators
Posts3,639
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.
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 >>