Skip to content

Commit e5f702d

Browse files
committed
Fix bug with parsing launch options
1 parent a1daba0 commit e5f702d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

ErScripts/SteamTools.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,16 +269,19 @@ std::wstring SteamTools::parseLaunchOptions(const std::wstring& filePath, std::s
269269
}
270270
}
271271

272-
std::wsmatch match;
273-
if (std::regex_search(line, match, launchOptionsRegex)) {
274-
file.close();
275-
return match[1].str();
272+
// Only match LaunchOptions when at depth 1 (main app section)
273+
if (braceDepth == 1) {
274+
std::wsmatch match;
275+
if (std::regex_search(line, match, launchOptionsRegex)) {
276+
file.close();
277+
return match[1].str();
278+
}
276279
}
277280
}
278281
}
279282

280283
file.close();
281-
return L"";
284+
return L"";
282285
}
283286

284287
std::optional<SteamTools::Crosshair> SteamTools::getCrosshairSettings(std::string_view appId) {

ErScripts/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
int main() {
88
if (!IsDebuggerPresent()) {
99
/* Auto updater */
10-
Updater updater("1.0.7", "emp0ry", "cs2-ErScripts", "ErScripts");
10+
Updater updater("1.0.8", "emp0ry", "cs2-ErScripts", "ErScripts");
1111
if (updater.checkAndUpdate())
1212
return 0;
1313

0 commit comments

Comments
 (0)