Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
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
LoP 1.46
Author: Remcon
Submitted by: Remcon
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
Users Online
CommonCrawl, Yandex

Members: 0
Guests: 16
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
614
BenitoVirg
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,639
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 >>