Login
User Name:

Password:



Register

Forgot your password?
 I3 and IMC
Dec 26, 2024 3:27 am
By GatewaySysop
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
LOP 1.6
Author: Remcon
Submitted by: Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
Users Online
There are currently no members online.

Members: 0
Guests: 21
Stats
Files
Topics
Posts
Members
Newest Member
496
3,808
19,708
594
MaisieMacl

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » [Bug:Helps] Help file keyword...
Forum Rules | Mark all | Recent Posts

[Bug:Helps] Help file keywords are case sensitive.
< Newer Topic :: Older Topic > AFKMud 2.1.3

Pages:<< prev 1 next >>
Post is unread #1 Mar 7, 2010 9:03 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,697
JoinedJan 1, 2002

 
Bug: Help file keywords are case sensitive.
Danger: Trivial - Case sensitivity is annoying, not dangerous.
Discovered in: AFKMud 2.1.3
Found by: tphegley, Quixadhal, and others
Fixed by: Quixadhal

---

help.cpp

Locate:
#include 


Below that, add:
#include 


help.cpp, load_helps

Locate:
      else if( key == "Keywords" )
      {
         stream.getline( buf, MSL );
         value = buf;
         strip_lspace( value );
         help->keyword = value;
      }


Change to:
      else if( key == "Keywords" )
      {
         stream.getline( buf, MSL );
         value = buf;
         strip_lspace( value );
         std::transform(value.begin(), value.end(), value.begin(), (int(*)(int)) toupper);
         help->keyword = value;
      }


help.cpp, get_help

Locate:
   while( !argument.empty(  ) )
   {
      argument = one_argument( argument, argone );
      if( !argall.empty(  ) )
         argall.append( 1, ' ' );
      argall.append( argone );
   }


Change to:
   while( !argument.empty(  ) )
   {
      argument = one_argument( argument, argone );
      if( !argall.empty(  ) )
         argall.append( 1, ' ' );
      argall.append( argone );
   }
   std::transform(argall.begin(), argall.end(), argall.begin(), (int(*)(int)) toupper);


Largely an annoyance, but during the conversion to std::string help file keywords lost their case-insensitivity due to how the code handles checking to see if the keywords entered by the user are part of a particular entry's list. This quick fix by Quixhadhal should solve the issue by forcing all help keywords into upper case as was the Smaug standard.

Pages:<< prev 1 next >>