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

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
Rane (42)
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,643
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 >>