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, Yandex, Bing, DotBot

Members: 0
Guests: 19
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
632
ClarenceKe
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SWR FUSS Bugfix List » [Bug] Named RIS flags not app...
Forum Rules | Mark all | Recent Posts

[Bug] Named RIS flags not applying on skills and spells
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 24, 2005, 8:26 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: Named RIS flags not applying on skills and spells.
Danger: Medium - Spells and skills will only appear to be working properly.
Found by: Txzeenath
Fixed by: Txzeenath/Samson

---

skills.c, do_sset

Locate:
         CREATE( aff, SMAUG_AFF, 1 );
         if( !str_cmp( duration, "0" ) )
            duration[0] = '\0';
         if( !str_cmp( modifier, "0" ) )
            modifier[0] = '\0';
         aff->duration = str_dup( duration );
         aff->location = loc;
         aff->modifier = str_dup( modifier );
         aff->bitvector = bit;
         aff->next = skill->affects;
         skill->affects = aff;
         send_to_char( "Ok.\n\r", ch );


Change to:
         CREATE( aff, SMAUG_AFF, 1 );
         if( !str_cmp( duration, "0" ) )
            duration[0] = '\0';
         if( !str_cmp( modifier, "0" ) )
            modifier[0] = '\0';
         aff->duration = str_dup( duration );
         aff->location = loc;
         if( loc == APPLY_AFFECT || loc == APPLY_RESISTANT || loc == APPLY_IMMUNE || loc == APPLY_SUSCEPTIBLE )
         {
            int modval = get_aflag( modifier );

            /* Sanitize the flag input for the modifier if needed -- Samson */
            if( modval < 0 )
               modval = 0;
            snprintf( modifier, MAX_INPUT_LENGTH, "%d", modval );
         }
         aff->modifier = str_dup( modifier );
         aff->bitvector = bit;
         aff->next = skill->affects;
         skill->affects = aff;
         send_to_char( "Ok.\n\r", ch );


Smaugspells are given their modifiers in string format. However the input to the modifier value in the sset command is not sanitized to produce numerical data the spell/skill system can use to apply RIS flags for spells and skills if it was typed in using the name of the flag.
       
Pages:<< prev 1 next >>