diff --git a/golded3/geread2.cpp b/golded3/geread2.cpp index 459a889..002fa0f 100644 --- a/golded3/geread2.cpp +++ b/golded3/geread2.cpp @@ -700,7 +700,7 @@ void ExternUtilMenu(GMsg* msg) static bool PeekURLCmp(const std::string &a, const std::string b) { - return stricmp(a.c_str(), b.c_str()) > 0; + return stricmp(a.c_str(), b.c_str()) < 0; } diff --git a/goldlib/gall/gwinpckf.cpp b/goldlib/gall/gwinpckf.cpp index 5db91fb..504c2ea 100644 --- a/goldlib/gall/gwinpckf.cpp +++ b/goldlib/gall/gwinpckf.cpp @@ -58,6 +58,7 @@ static bool compare(const std::string str1, const std::string str2) bool dir1 = !!strchr(str1.c_str(), GOLD_SLASH_CHR); bool dir2 = !!strchr(str2.c_str(), GOLD_SLASH_CHR); if (dir1 && !dir2) return true; + if (!dir1 && dir2) return false; std::string s1 = dir1 ? str1.substr(0, str1.length()-1) : str1; std::string s2 = dir2 ? str2.substr(0, str2.length()-1) : str2; @@ -72,7 +73,7 @@ static bool compare(const std::string str1, const std::string str2) cmp = strcmp(s1.c_str(), s2.c_str()); } - return (cmp > 0); + return (cmp < 0); }