Wow good catch! I saw the chat truncation thing once before, but chalked it up
to a networking glitch or something so I didn't report it. I should have
investigated further. Do you know how this bug trickles down to causing the
chat truncation?
Worthy of note is that stringpool.cpp contains test_stringpool, which is a test
for that very case-insensitivity. CStringPool seems to be basically be a
reinvention of the std::set<std::string> wheel, but case-insensitive.
At 2006/03/27 03:00 PM, Jorge Rodriguez wrote:
>In stringpool.cpp there is this function:
>
>bool StrLess( const char * const &pszLeft, const char * const &pszRight )
>{
> return ( Q_stricmp( pszLeft, pszRight) < 0 );
>}
>
>It is used to compare strings in the string table to see if there is
>already one in the table that can be used. The string table is used to
>store player names. A problem arises when a player changes his name to
>something that is identical except for different cases. The game will
>allow the change because it uses Q_strcmp, but the string table will not
>replace the name because of the Q_stricmp above. The result if that if a
>player is named "Vino" (like me) and he switches his name to "vino", the
>game will execute all the player name change functions, but pl.netname
>will not be updated, because the string table thinks "Vino" is the same
>thing as "vino". This then in turn causes problems when the player tries
>to use chat, the last character of the player's message is truncated.
>You can replicate this bug yourself in HL2DM and probably CS:S and
>DOD:S. So what about this:
>
>bool StrLess( const char * const &pszLeft, const char * const &pszRight )
>{
>- return ( Q_stricmp( pszLeft, pszRight) < 0 );
>+ return ( Q_strcmp( pszLeft, pszRight) < 0 );
>}
>
>Changing Q_stricmp to Q_strcmp will fix that problem chat problem, but
>that seems to me like jacking around with the foundation of the house to
>fix one window sill. It's bound to screw up lots of other stuff, but
>when I loaded up a game nothing seemed to be affected. So, I'm here
>asking for opinions. Does anybody think this is a good idea?
>
>--
>Jorge "Vino" Rodriguez
>
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives, please
>visit:
>http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders