From 76c154a567c8e211b27801b507f29c4e8f7bb92b Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Wed, 8 Mar 2017 20:32:21 +0000 Subject: [PATCH] Fix #5285. Config file not read correctly. When the hashing function finds a collision such as on play_intro and auto_staff_placement it has to do a string compare to find out if two map entries are different. Due to a mistype this comparison would always return true. This meant that the auto_staff_placement value would overwrite the play_intro value. Mistake caused when fixing previous bug --- src/openrct2/config/IniReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/config/IniReader.cpp b/src/openrct2/config/IniReader.cpp index de6ae2a35d..c668165d84 100644 --- a/src/openrct2/config/IniReader.cpp +++ b/src/openrct2/config/IniReader.cpp @@ -84,7 +84,7 @@ struct StringICmp for (std::size_t i = a.size(); i > 0; --i, ++s1, ++s2) { const int c1 = std::toupper(Traits::to_int_type(*s1)); - const int c2 = std::toupper(Traits::to_int_type(*s1)); + const int c2 = std::toupper(Traits::to_int_type(*s2)); if (c1 != c2) return false; } return true;