From b41517cd911defa46c56d69cdefc8714124f718e Mon Sep 17 00:00:00 2001 From: Lyberta Date: Sun, 4 Aug 2019 14:10:22 +0000 Subject: [PATCH] Added hash comments to DLC.txt --- dll/steam_client.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dll/steam_client.cpp b/dll/steam_client.cpp index 48e69ac..3c85575 100644 --- a/dll/steam_client.cpp +++ b/dll/steam_client.cpp @@ -215,13 +215,16 @@ Steam_Client::Steam_Client() settings_server->unlockAllDLC(false); PRINT_DEBUG("Locking all DLC\n"); - for( std::string line; getline( input, line ); ) { - if (!line.empty() && line[line.length()-1] == '\n') { - line.erase(line.length()-1); + for( std::string line; std::getline( input, line ); ) { + if (!line.empty() && line.front() == '#') { + continue; + } + if (!line.empty() && line.back() == '\n') { + line.pop_back(); } - if (!line.empty() && line[line.length()-1] == '\r') { - line.erase(line.length()-1); + if (!line.empty() && line.back() == '\r') { + line.pop_back(); } std::size_t deliminator = line.find("=");