Fix compatibility with newer libconfig. Patch copied from upstream source repository: https://gitlab.com/lierolibre/lierolibre/commit/b27e3604aa6bfbfcc50db1000b394d06c87ae2f2 diff --git a/src/common.cpp b/src/common.cpp index 2d6ada5..4942b05 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -162,7 +162,7 @@ void Texts::loadFromCFG(std::string cfgFilePath) const libconfig::Setting &sgmodes = texts["gameModes"]; for(int i = 0; i < 4; ++i) { - gameModes[i] = (char const*)sgmodes["gameModes" + to_string(i)]; + gameModes[i] = (char const*)sgmodes[("gameModes" + to_string(i)).c_str()]; } const libconfig::Setting &sgmspec = texts["gameModeSpec"]; @@ -181,13 +181,13 @@ void Texts::loadFromCFG(std::string cfgFilePath) const libconfig::Setting &swstates = texts["weapStates"]; for(int i = 0; i < 3; ++i) { - weapStates[i] = (char const*)swstates["weapStates" + to_string(i)]; + weapStates[i] = (char const*)swstates[("weapStates" + to_string(i)).c_str()]; } const libconfig::Setting &sknames = texts["keyNames"]; for(int i = 1; i < 177; ++i) // First
aboutsummaryrefslogtreecommitdiff |