Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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, Yandex

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] Any item is allowed to ...
Forum Rules | Mark all | Recent Posts

[Bug] Any item is allowed to be used in a socketed item slot
< Newer Topic :: Older Topic > AFKMud 1.63

Pages:<< prev 1 next >>
Post is unread #1 Oct 2, 2004, 11:20 am   Last edited Nov 13, 2005, 12:13 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: Any item is allowed to be used in a socketed item slot.
Discovered in: AFKMud 1.63
Danger: Medium - Unintended item alteration
Found by: Exo
Fixed by: Samson

treasure.c, do_socket

Find the following:

   if( ( rune = get_obj_carry( ch, arg ) ) == NULL )
   {
        ch_printf( ch, "You do not have a %s rune in your inventory!\n\r", arg );
        return;
   }

   if( ( item = get_obj_carry( ch, argument ) ) == NULL )
   {
        ch_printf( ch, "You do not have a %s in your inventory!\n\r", argument );
        return;
   }


Below that, add:

   if( rune->item_type != ITEM_RUNE )
   {
      ch_printf( ch, "%s is not a rune and cannot be used like that!\n\r", rune->short_descr );   
      return;
   }


This is your typical run of the mill "oops" error in checking the validity of what you're doing. Forgetting to verify that the item being used to insert into the socket is actually a rune. I'm sure this could have resulted in all sorts of interesting results that were never intended to happen.
       
Pages:<< prev 1 next >>