Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Yesterday, 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, Sogou, Bing

Members: 0
Guests: 4
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 » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] Classes with no name me...
Forum Rules | Mark all | Recent Posts

[Bug] Classes with no name mess up the display during character creation
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 5, 2005, 4:04 pm   Last edited May 11, 2005, 6:52 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: Classes with no name will mess up the display during character creation.
Danger: Low
Found by: Baelzebub
Fixed by: Baelzebub

comm.c, nanny

In CON_GET_NEW_SEX, locate the following:

    for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )
	{
     if ( class_table[iClass]->who_name &&
       class_table[iClass]->who_name[0] != '\0' )
     {
       if ( iClass > 0 )
       {
    if ( strlen(buf)+strlen(class_table[iClass]->who_name) > 77 )
    {
       strcat( buf, "\n\r" );
       write_to_buffer( d, buf, 0 );
       buf[0] = '\0';
    }
    else
       strcat( buf, " " );
       }
     }
     strcat( buf, class_table[iClass]->who_name );
	}


Replace with:

    for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )
	{
     if ( class_table[iClass]->who_name &&
       class_table[iClass]->who_name[0] != '\0' )
     {
       if ( iClass > 0 )
       {
    if ( strlen(buf)+strlen(class_table[iClass]->who_name) > 77 )
    {
       strcat( buf, "\n\r" );
       write_to_buffer( d, buf, 0 );
       buf[0] = '\0';
    }
    else
       strcat( buf, " " );
       }
       strcat( buf, class_table[iClass]->who_name );
     }
	}


Basically just moving the final strcat statement up above the bracket instead of between the last 2 brackets. Without this fix, classes with no name will be added into the list shown to players and will cause unpredictable results, usually in the form of simply displaying something it shouldn't.
       
Pages:<< prev 1 next >>