Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
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
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl

Members: 0
Guests: 20
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
633
Rhyader
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS 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:25 pm
Go to the top of the page
Go to the bottom of the page

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