Login
User Name:

Password:



Register

Forgot your password?
Forum Search/User Post History
May 13, 2019 12:43 pm
By Keirath
AFKMud 2.2.2
Mar 3, 2019 5:35 pm
By Samson
Development
Nov 28, 2018 12:10 pm
By Keirath
First Immortal
Oct 12, 2018 2:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018 7:31 pm
By joeyfogas
SmaugFUSS 1.9.3
Author: Various
Submitted by: Samson
AFKMud 2.2.2
Author: AFKMud Team
Submitted by: Samson
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
Users Online
CommonCrawl

Members: 0
Guests: 0
Stats
Files
Topics
Posts
Members
Newest Member
482
3,746
19,403
574
Throckrod

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,653
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 >>