diff options
author | Willem Jan Palenstijn | 2009-05-11 20:53:28 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-05-11 20:53:28 +0000 |
commit | 3b9f21be8025c37b5c10ba9fbbfaa1f47746b3a2 (patch) | |
tree | b5da13d76f0a960b02ae9f5b67c04381c6a9b69c | |
parent | 0561caa447857445b585327a6e2b087019af8eac (diff) | |
download | scummvm-rg350-3b9f21be8025c37b5c10ba9fbbfaa1f47746b3a2.tar.gz scummvm-rg350-3b9f21be8025c37b5c10ba9fbbfaa1f47746b3a2.tar.bz2 scummvm-rg350-3b9f21be8025c37b5c10ba9fbbfaa1f47746b3a2.zip |
Use lowercase form for quickselect in ListWidget.
This matches POSIX strcasecmp and MSVC stricmp behaviour.
svn-id: r40467
-rw-r--r-- | gui/ListWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 4df3ec9bdc..7f6c315ac0 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -205,12 +205,12 @@ int ListWidget::findItem(int x, int y) const { static int matchingCharsIgnoringCase(const char *x, const char *y, bool &stop) { int match = 0; - while (*x && *y && toupper(*x) == toupper(*y)) { + while (*x && *y && tolower(*x) == tolower(*y)) { ++x; ++y; ++match; } - stop = !*y || (*x && (toupper(*x) >= toupper(*y))); + stop = !*y || (*x && (tolower(*x) >= tolower(*y))); return match; } |