Skip to content

Commit

Permalink
Fixed the launch support to handle multiple processes (ini parsing wa…
Browse files Browse the repository at this point in the history
…s incorrect)
  • Loading branch information
pmeenan committed Apr 2, 2014
1 parent d4dca72 commit c0d0e1a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/adbwatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ void LoadSettings() {
lstrcpy(PathFindExtension(ini_file), L".ini");
if (GetPrivateProfileSection(L"Launch", launch_section,
sizeof(launch_section) / sizeof(launch_section[0]), ini_file)) {
wchar_t * next_token = NULL;
wchar_t * line = wcstok_s(launch_section, L"\r\n", &next_token);
while (line) {
wchar_t * line = launch_section;
while (line && lstrlen(line)) {
CString trimmed(line);
trimmed.Trim();
if (trimmed.GetLength())
launch_processes.Add(line);
line = wcstok_s(NULL, L"\r\n", &next_token);
line += lstrlen(line) + 1;
}
}
startup_delay = GetPrivateProfileInt(L"General", L"Startup Delay",
Expand Down

0 comments on commit c0d0e1a

Please sign in to comment.