Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
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
LOP 1.45
Author: Remcon
Submitted by: Remcon
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
Users Online
CommonCrawl, Bing, Yahoo!, Google, DotBot

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Few other slight issues
Forum Rules | Mark all | Recent Posts

Few other slight issues
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 17, 2005, 3:40 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Ok, its well past time to fix these
handler.c
obj_to_char
find
   if( IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) )
   {
      if( !IS_IMMORTAL( ch ) && ( IS_NPC( ch ) && !xIS_SET( ch->act, ACT_PROTOTYPE ) ) )
         return obj_to_room( obj, ch->in_room );
   }

before that add
   if( !obj )
   {
       bug( "%s: NULL obj.", __FUNCTION__ );
       return NULL;
   }
   if( !ch )
   {
      bug( "%s: NULL ch.", __FUNCTION__ );
      return NULL;
   }

We could i guess exit like it does in create_object but shrug your choice on exiting or returning NULL.

obj_to_room
find
   for( paf = obj->first_affect; paf; paf = paf->next )
      room_affect( pRoomIndex, paf, TRUE );

   for( paf = obj->pIndexData->first_affect; paf; paf = paf->next )
      room_affect( pRoomIndex, paf, TRUE );

above those add
   if( !obj )
   {
      bug( "%s: NULL obj.", __FUNCTION__ );
      return NULL;
   }
   if( !pRoomIndex )
   {
      bug( "%s: NULL pRoomIndex.", __FUNCTION__ );
      return NULL;
   }

Shrug if nothing else it should protect it from some crashes later on as well as maybe let us know there are some issues somewhere.
       
Pages:<< prev 1 next >>