#12 wildcmp is case sensitive

v0.50
closed
5
2012-09-07
2002-07-29
Ulf Wohlers
No

In function localdrive::FindNext it is possible that
wildcmp is called with identical strings, but one lower
case and the other in upper case and wildcmp doesn't
find match, cos it's case sensitive.

Happened with "Dungeon master", file "VGA".
Call: wildcmp("VGA","vga")

I changed third line from:
if ((wild != string) && (wild != '?')) {
to
if ((
upcase(wild) != upcase(string)) && (wild != '?')) {
then it works.

Discussion

  • Peter Veenstra
    Peter Veenstra
    2002-07-30

    Logged In: YES
    user_id=535630

    You are right.

    I also changed :
    } else if ((wild== string) || (wild == '?')) {
    to:
    } else if ((
    upcase(wild) == upcase(string)) || (wild
    == '?')) {