diff --git a/src/common/HighScoreManager.cxx b/src/common/HighScoreManager.cxx index a92ab1ad7..868ff5830 100644 --- a/src/common/HighScoreManager.cxx +++ b/src/common/HighScoreManager.cxx @@ -51,7 +51,7 @@ Int32 HighScoreManager::numVariations() Properties props; string numVariations = properties(props).get(PropType::Cart_Variations); - return (numVariations == EmptyString) ? 1 : std::min(stoi(numVariations), 256); + return (numVariations == EmptyString) ? 1 : std::min(BSPF::stringToInt(numVariations), 256); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -60,7 +60,7 @@ Int32 HighScoreManager::numPlayers() Properties props; string numPlayers = properties(props).get(PropType::Cart_Players); - return (numPlayers == EmptyString) ? 1 : std::min(stoi(numPlayers), 4); + return (numPlayers == EmptyString) ? 1 : std::min(BSPF::stringToInt(numPlayers), 4); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -194,4 +194,4 @@ Int32 HighScoreManager::score() return scores[std::min(player, Int32(3))]; return -1; -} \ No newline at end of file +}