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
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
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
Users Online
CommonCrawl, Majestic-12, DotBot, Google

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
479
3,708
19,242
614
BenitoVirg
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] Buffers being assigned ...
Forum Rules | Mark all | Recent Posts

[Bug] Buffers being assigned but never actually used
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 3, 2005, 11:07 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: Buffers being assigned but never actually used
Danger: Trivial - Lack of output, unnecessary buffer use
Found by: Remcon
Fixed by: Remcon

---

update.c, advance_level

Locate:
   /*
    * bonus for deadlies 
    */
   if( IS_PKILL( ch ) )
   {
      add_mana = ( int )( add_mana + add_mana * .3 );
      add_move = ( int )( add_move + add_move * .3 );
      add_hp += 1;   /* bitch at blod if you don't like this :) */
      sprintf( buf, "Gravoc's Pandect steels your sinews.\n\r" );
   }


Change to:
   /*
    * bonus for deadlies 
    */
   if( IS_PKILL( ch ) )
   {
      add_mana = ( int )( add_mana + add_mana * .3 );
      add_move = ( int )( add_move + add_move * .3 );
      add_hp += 1;   /* bitch at blod if you don't like this :) */
      send_to_char( "Gravoc's Pandect steels your sinews.\n\r", ch );
   }


update.c, gain_exp

Locate:
   /*
    * Deadly exp loss floor is exp floor of level
    */
   if( IS_PKILL( ch ) && modgain < 0 )
   {
      if( ch->exp + modgain < exp_level( ch, ch->level ) )
      {
         modgain = exp_level( ch, ch->level ) - ch->exp;
         sprintf( buf, "Gravoc's Pandect protects your insight.\n\r" );
      }
   }


Change to:
   /*
    * Deadly exp loss floor is exp floor of level
    */
   if( IS_PKILL( ch ) && modgain < 0 )
   {
      if( ch->exp + modgain < exp_level( ch, ch->level ) )
      {
         modgain = exp_level( ch, ch->level ) - ch->exp;
         send_to_char( "Gravoc's Pandect protects your insight.\n\r", ch );
      }
   }


shops.c, appraise_all

Locate:
   char buf[MAX_STRING_LENGTH], *pbuf = buf;


Change to:
   char buf[MAX_STRING_LENGTH];


Locate:
   if( total > 0 )
   {
      send_to_char( "\n\r", ch );
      sprintf( buf, "$N tells you, 'It will cost %d piece%s of gold in total.'", total, cost == 1 ? "" : "s" );
      act( AT_TELL, buf, ch, NULL, keeper, TO_CHAR );
      strcpy( pbuf, "$N tells you, 'Remember there is a 10% surcharge for repair all.'" );
      act( AT_TELL, buf, ch, NULL, keeper, TO_CHAR );
   }


Change to:
   if( total > 0 )
   {
      send_to_char( "\n\r", ch );
      sprintf( buf, "$N tells you, 'It will cost %d piece%s of gold in total.'", total, cost == 1 ? "" : "s" );
      act( AT_TELL, buf, ch, NULL, keeper, TO_CHAR );
      act( AT_TELL, "$N tells you, 'Remember there is a 10% surchurge for repair all'", ch, NULL, keeper, TO_CHAR );
   }


The above fixes are more or less things that got overlooked, though one does wonder why the lack of output in two of them was never noticed after all these years.....
       
Pages:<< prev 1 next >>